public void Https_ShouldThrowGivenNotFoundPhysicalPath() { string path = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); if (Directory.Exists(path)) { Directory.Delete(path, recursive: true); } Assert.Throws <DirectoryNotFoundException>(() => IisExpress.Https().PhysicalPath(path)); }
static HttpsIisExpressOptions CreateHttpsOptions() => IisExpress.Https().PhysicalPath(Hosting.GetHostingDirectory()).Port(44300);
public void Start_ShouldThrowGivenUnsetPort() { Assert.Throws <InvalidOperationException>(() => IisExpress.Https().PhysicalPath(Path.GetTempPath()).Start()); }
public void Https_ShouldThrowGivenOutOfRangeHttpsPort(ushort port) { Assert.Throws <ArgumentOutOfRangeException>(() => IisExpress.Https().Port(port)); }