コード例 #1
0
ファイル: HostingHook.cs プロジェクト: tahlil-ahmadi/GodOfWar
        public static void BeforeTestSuiteRun()
        {
            var projectPath = Path.GetFullPath(@"..\..\..\ServiceHost");

            host = new IISExpressHost(projectPath, 20070);
            host.Start();
        }
コード例 #2
0
        public void ThrowExceptionWhenNotFoundWebApplicationPath()
        {
            Action action = () => IISExpressHost.Start("Foo.Bar.Web", 8088);

            action.ShouldThrow <DirectoryNotFoundException>()
            .WithMessage("Could not infer the web application folder path.");
        }
コード例 #3
0
ファイル: HostSetup.cs プロジェクト: ilmaz/WarCraft-Tiger
        public static void BeforeTestSuiteRun()
        {
            var serviceHostPath = @"C:\Courses\DDD-Tiger\Session13\WarCraft-Tiger\Code\ServiceHost";

            _host = new IISExpressHost(serviceHostPath, 29210);
            _host.Start();
        }
コード例 #4
0
        public void ThrowExceptionWhenNotFoundIISExpressPath()
        {
            const string iisExpressPath = @"Z:\Foo\Bar\iis.exe";

            Action action = () => IISExpressHost.Start(null, iisExpressPath: iisExpressPath);

            action.ShouldThrow <IISExpressNotFoundException>();
        }
コード例 #5
0
        public void SetUp()
        {
            environmentVariables = new Dictionary <string, string> {
                { "Foo1", "Bar1" }, { "Sample2", "It work's!" }
            };

            IISExpressHost.Start("IISExpressBootstrapper.SampleApp", 8088, environmentVariables);
        }
コード例 #6
0
        public static void BeforeTestSuiteRun()
        {
            //TODO: do not hard code this, nooooooooooooooooooo
            var projectPath = @"C:\Courses\Jame-GodOfWar\Session 15\GodOfWar\Code\ServiceHost";

            host = new IISExpressHost(projectPath, 20070);
            host.Start();
        }
コード例 #7
0
        public static void StartHost()
        {
            var projectPath = ConfigurationManager.AppSettings["SUTPath"];
            var port        = int.Parse(ConfigurationManager.AppSettings["SUTPort"]);

            host = new IISExpressHost(projectPath, port);
            host.Start();
        }
コード例 #8
0
        public void CallsStatusCheckRepeatedlyUntilItRespondsWith200()
        {
            _host.Start();
            var finalStatusResponseBody = Get("http://localhost:9058/status");
            var attempts = finalStatusResponseBody.Split(',').Select(ticks => new DateTime(long.Parse(ticks))).ToArray();

            Assert.That(attempts.Count(), Is.EqualTo(10));
            Assert.That((attempts.Last() - attempts.First()).TotalMilliseconds, Is.GreaterThan(800).And.LessThan(1200));
        }
コード例 #9
0
        public void StartHost()
        {
            _configFilePath = Path.GetFullPath(TestContext.CurrentContext.TestDirectory + "/applicationhost.config");
              _webAppPath = Path.GetFullPath(TestContext.CurrentContext.TestDirectory + "../../../../Centaur.ExampleWebApp/");
            configurePhysicalPath(_configFilePath, _webAppPath);

            _host = new IISExpressHost(new IISExpressConfig(_configFilePath));
            _host.Start();
        }
コード例 #10
0
        public static void LaunchIISExpress()
        {
            _webServer.Start();

            using (var wc = new WebClient())
            {
                wc.DownloadString(new Uri($"{_webServer.BaseUrl}/database/restorefortests"));
            }
        }
コード例 #11
0
        public void StartingWithInvalidConfigurationShouldWriteMessage()
        {
            string s = null;

            IISExpressHost.Start(new ConfigFileParameters {
                ConfigFile = "", SiteName = "Does not exist"
            },
                                 output: message => { s = message; });

            s.Should().NotBeNullOrEmpty();
        }
コード例 #12
0
ファイル: WebTestBase.cs プロジェクト: AffinityID/uConcur
        public virtual void BeforeAllTests()
        {
            var assemblyDirectoryPath = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath);
            var path = Path.GetFullPath(Path.Combine(
                                            // ReSharper disable once AssignNullToNotNullAttribute
                                            assemblyDirectoryPath, "../../../uConcur.Tests.Web.Umbraco-7.4.0"
                                            ));

            if (!Directory.Exists(path))
            {
                throw new FileNotFoundException($"Path '{path}' was not found.", path);
            }

            _database = new TestDatabase(Path.Combine(path, "App_Data/Umbraco.sdf"));
            _database.Recreate(Path.Combine(path, "App_Data/Umbraco.sdf.sql"));

            _iis = new IISExpressHost(path, Port) /* { LogOutput = true }*/;
            _iis.Start();
        }
コード例 #13
0
 public static void LaunchIISExpress()
 {
     _webServer.Start();
 }
コード例 #14
0
ファイル: WebApplication.cs プロジェクト: macashang/trial-99
 public void Start()
 {
     host = IISExpressHost.Start(parameters);
 }
コード例 #15
0
ファイル: ExampleWebAppTest.cs プロジェクト: hibri/Centaur
 public void StartHost()
 {
     _host = new IISExpressHost(TestContext.CurrentContext.TestDirectory + "../../../../Centaur.ExampleWebApp/", 9059);
     _host.Start();
 }
コード例 #16
0
 public void StartHost()
 {
     _host = new IISExpressHost(TestContext.CurrentContext.TestDirectory + "../../../../Centaur.ExampleWebApp/", 9059);
     _host.EnvironmentVariables.Add("PAYLOAD", "injected");
     _host.Start();
 }
コード例 #17
0
 public void StartHost()
 {
     _host = new IISExpressHost("../../../Centaur.ExampleWebApp/", 9059);
     _host.Start();
 }