public void ReloadEnvironmentByChangingBinDir() { var binSourcePath = "Tests/ExampleApps/SetUpEnvironmentApp/bin/"; GivenDLLsAreDeployedFrom(binSourcePath, (binDirPath) => { using (var env = ServerRunner.RunWith( EnvironmentOptionsTo( dllPath: Path.Combine(binDirPath, "SetUpEnvironmentApp.dll"), typeName: "SetUpEnvironmentApp.ServerEnvironment"))) { Assert.That(client.Get("http://localhost:9901/"), Is.Not.Empty); EmptyDir(binDirPath); Execution.Eventually(() => { try { Assert.That(client.Get("http://localhost:9901/"), Is.Not.Empty); Assert.Fail("Server must go down"); } catch (AssertionException) { throw; } catch (Exception ex) { } }); } }); }
public void StartServerEnvironment() { ServerRunner.RunWith( EnvironmentOptionsTo( dllPath: "Tests/ExampleApps/SetUpEnvironmentApp/bin/SetUpEnvironmentApp.dll", typeName: "SetUpEnvironmentApp.ServerEnvironment")); Assert.That(client.Get("http://localhost:9901/"), Is.Not.Empty); }
public void StartSimpleEnvironmentWithDirectReferenceToLifecycle() { ServerRunner.RunWith( EnvironmentOptionsTo( dllPath: "Tests\\ExampleApps\\SetUpEnvironmentApp\\bin\\SetUpEnvironmentApp.dll", typeName: "SetUpEnvironmentApp.ExampleEnvironmentLifecycle"), output: output, error: error); Assert.That(output.ToString(), Does.Contain("Started")); }
public void StartSimpleEnvironment() { ServerRunner.RunWith( EnvironmentOptionsTo( dllPath: "Tests/ExampleApps/SetUpEnvironmentApp/bin/SetUpEnvironmentApp.dll", typeName: "SetUpEnvironmentApp.ExampleEnvironment"), output: output, error: error); Assert.That(output.ToString(), Does.Contain("Started")); }
public void LoadEnvironmentByPostPopulatingTheDir() { var binSourcePath = "Tests/ExampleApps/SetUpEnvironmentApp/bin/"; var binDirPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); using (var env = ServerRunner.RunWith( EnvironmentOptionsTo( dllPath: Path.Combine(binDirPath, "SetUpEnvironmentApp.dll"), typeName: "SetUpEnvironmentApp.ServerEnvironment"))) { CopyFilesTo(binSourcePath, binDirPath); Execution.Eventually(() => Assert.That(client.Get("http://localhost:9901/"), Is.Not.Empty)); } }