示例#1
0
        public void TestBlacklistDns()
        {
            IPBanConfig config = IPBanConfig.LoadFromXml("<?xml version='1.0'?><configuration>" +
                                                         "<appSettings><add key='Blacklist' value='test.com' /></appSettings></configuration>",
                                                         this);

            Assert.IsFalse(config.IsWhitelisted("99.88.77.66"));
            Assert.IsTrue(config.IsBlackListed("99.88.77.66"));
        }