Exemplo n.º 1
0
        public void ProxyAndPortAndUser_DefaultsToPasswordNull()
        {
            var proxy = new ProxyManagerDouble("http://[email protected]:8080");

            Assert.That(proxy.Hostname, Is.EqualTo("example.com"));
            Assert.That(proxy.Port, Is.EqualTo(8080));
            Assert.That(proxy.Username, Is.EqualTo("user"));
            Assert.That(proxy.Password, Is.Null);
        }
Exemplo n.º 2
0
        public void ProxyNoPort_DefaultsToPort80()
        {
            var proxy = new ProxyManagerDouble("http://example.com");

            Assert.That(proxy.Hostname, Is.EqualTo("example.com"));
            Assert.That(proxy.Port, Is.EqualTo(80));
            Assert.That(proxy.Username, Is.Null);
            Assert.That(proxy.Password, Is.Null);
        }
Exemplo n.º 3
0
        public void ProxyNoProtocol_DefaultsToNull()
        {
            var proxy = new ProxyManagerDouble("example.com");

            Assert.That(proxy.Hostname, Is.Null);
            Assert.That(proxy.Port, Is.EqualTo(0));
            Assert.That(proxy.Username, Is.Null);
            Assert.That(proxy.Password, Is.Null);
        }
Exemplo n.º 4
0
        public void ProxyAndPortAndUserAndPassword()
        {
            var proxy = new ProxyManagerDouble("http://*****:*****@example.com:8080");

            Assert.That(proxy.Hostname, Is.EqualTo("example.com"));
            Assert.That(proxy.Port, Is.EqualTo(8080));
            Assert.That(proxy.Username, Is.EqualTo("user"));
            Assert.That(proxy.Password, Is.EqualTo("password"));
        }
Exemplo n.º 5
0
        public void NoProxy_DefaultsToNull()
        {
            var proxy = new ProxyManagerDouble(null);

            Assert.That(proxy.Hostname, Is.Null);
            Assert.That(proxy.Port, Is.EqualTo(0));
            Assert.That(proxy.Username, Is.Null);
            Assert.That(proxy.Password, Is.Null);
        }
Exemplo n.º 6
0
        public void NoProxy_DefaultsToNull()
        {
            var proxy = new ProxyManagerDouble(null);

            Assert.That(proxy.Hostname, Is.Null);
            Assert.That(proxy.Port, Is.EqualTo(0));
            Assert.That(proxy.Username, Is.Null);
            Assert.That(proxy.Password, Is.Null);
        }
Exemplo n.º 7
0
        public void ProxyAndPortAndUser_DefaultsToPasswordNull()
        {
            var proxy = new ProxyManagerDouble("http://[email protected]:8080");

            Assert.That(proxy.Hostname, Is.EqualTo("example.com"));
            Assert.That(proxy.Port, Is.EqualTo(8080));
            Assert.That(proxy.Username, Is.EqualTo("user"));
            Assert.That(proxy.Password, Is.Null);
        }
Exemplo n.º 8
0
        public void ProxyAndPortAndUserAndPassword()
        {
            var proxy = new ProxyManagerDouble("http://*****:*****@example.com:8080");

            Assert.That(proxy.Hostname, Is.EqualTo("example.com"));
            Assert.That(proxy.Port, Is.EqualTo(8080));
            Assert.That(proxy.Username, Is.EqualTo("user"));
            Assert.That(proxy.Password, Is.EqualTo("password"));
        }
Exemplo n.º 9
0
        public void ProxyNoProtocol_DefaultsToNull()
        {
            var proxy = new ProxyManagerDouble("example.com");

            Assert.That(proxy.Hostname, Is.Null);
            Assert.That(proxy.Port, Is.EqualTo(0));
            Assert.That(proxy.Username, Is.Null);
            Assert.That(proxy.Password, Is.Null);
        }
Exemplo n.º 10
0
        public void ProxyNoPort_DefaultsToPort80()
        {
            var proxy = new ProxyManagerDouble("http://example.com");

            Assert.That(proxy.Hostname, Is.EqualTo("example.com"));
            Assert.That(proxy.Port, Is.EqualTo(80));
            Assert.That(proxy.Username, Is.Null);
            Assert.That(proxy.Password, Is.Null);
        }