public void ParsesHttpsPort4000WithHostAndPath()
        {
            var parser = new WebSiteBindingParser();
            var binding = parser.Parse("https://example.com:4000/path/to/website");

            Assert.That(binding.Port, Is.EqualTo(4000));
            Assert.That(binding.Host, Is.EqualTo("example.com"));
            Assert.That(binding.Protocol, Is.EqualTo("https"));
            Assert.That(binding.Path, Is.EqualTo("/path/to/website"));
        }
        public void ParsesHttpsNoPortWithHost()
        {
            var parser = new WebSiteBindingParser();
            var binding = parser.Parse("https://example.com/");

            Assert.That(binding.Port, Is.EqualTo(443));
            Assert.That(binding.Host, Is.EqualTo("example.com"));
            Assert.That(binding.Protocol, Is.EqualTo("https"));
            Assert.That(binding.Path, Is.Null);
        }
        public void ParsesHttpPort4000WithoutHost()
        {
            var parser = new WebSiteBindingParser();
            var binding = parser.Parse("http://*:4000/");

            Assert.That(binding.Port, Is.EqualTo(4000));
            Assert.That(binding.Host, Is.Null);
            Assert.That(binding.Protocol, Is.EqualTo("http"));
            Assert.That(binding.Path, Is.Null);
        }
        public void ParsesHttpWithIpAddress()
        {
            var parser = new WebSiteBindingParser();
            var binding = parser.Parse("https://127.0.0.1:4000/");

            Assert.That(binding.Port, Is.EqualTo(4000));
            Assert.That(binding.IpAddress, Is.EqualTo(new IPAddress(new byte[] {127, 0, 0, 1})));
            Assert.That(binding.Host, Is.Null);
            Assert.That(binding.Protocol, Is.EqualTo("https"));
            Assert.That(binding.Path, Is.Null);
        }
Exemple #5
0
 public Iis7()
 {
     WebSiteBindingParser = new WebSiteBindingParser();
 }
Exemple #6
0
 public Iis7()
 {
     WebSiteBindingParser = new WebSiteBindingParser();
 }