public void Http_ShouldThrowGivenNotFoundPhysicalPath() { string path = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); if (Directory.Exists(path)) { Directory.Delete(path, recursive: true); } Assert.Throws <DirectoryNotFoundException>(() => IisExpress.Http().PhysicalPath(path)); }
public void Http_ShouldThrowGivenOutOfRangeHttpPort() { Assert.Throws <ArgumentOutOfRangeException>(() => IisExpress.Http().Port(0)); }
public void Start_ShouldThrowGivenUnsetPort() { Assert.Throws <InvalidOperationException>(() => IisExpress.Http().PhysicalPath(Path.GetTempPath()).Start()); }
static HttpIisExpressOptions CreateHttpOptions() => IisExpress.Http().PhysicalPath(Hosting.GetHostingDirectory()).Port(8080);