コード例 #1
0
        public void ProxyBypassTest()
        {
            Setting.Clear();
            Setting.Reload();

            var proxy = new AuthProxyModule();
            Assert.IsTrue(proxy.IsBypassed(new Uri("http://aa.com")));
            Assert.IsTrue(proxy.IsBypassed(new Uri("http://bb.cc.com")));

            Assert.IsFalse(proxy.IsBypassed(new Uri("http://zz.aa.com")));
            Assert.IsFalse(proxy.IsBypassed(new Uri("http://cc.com")));
            Assert.IsFalse(proxy.IsBypassed(new Uri("http://ee.cc.com")));
        }
コード例 #2
0
        public void XmlにBypassListなし()
        {
            Setting.Clear();
            Setting.Reload();


            Assert.AreEqual("http://proxy.com:8080", Setting.ProxyServer);
            Assert.AreEqual("user", Setting.ProxyUser);
            Assert.AreEqual("password", Setting.ProxyPassword);

            Assert.IsNull(Setting.ProxyBypassList);
            var proxy = new AuthProxyModule();
            Assert.IsFalse(proxy.IsBypassed(new Uri("http://aa.com")));
        }