예제 #1
0
        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));
        }
예제 #2
0
 static HttpsIisExpressOptions CreateHttpsOptions() =>
 IisExpress.Https().PhysicalPath(Hosting.GetHostingDirectory()).Port(44300);
예제 #3
0
 public void Start_ShouldThrowGivenUnsetPort()
 {
     Assert.Throws <InvalidOperationException>(() => IisExpress.Https().PhysicalPath(Path.GetTempPath()).Start());
 }
예제 #4
0
 public void Https_ShouldThrowGivenOutOfRangeHttpsPort(ushort port)
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => IisExpress.Https().Port(port));
 }