예제 #1
0
        public void IsMatch_OutsideAfter( )
        {
            var netRoute = new SUTest(
                new NetIpAddress(124, 102, 0, 0),
                new NetIpAddress(255, 255, 0, 0),
                new NetIpAddress(172, 144, 11, 201));

            var netIpAddressOutsideAfter = new NetAddress(
                new NetIpAddress(124, 103, 0, 1),
                new NetIpAddress(255, 255, 0, 0));

            Assert.AreEqual(false, netRoute.IsMatch(netIpAddressOutsideAfter));
        }
예제 #2
0
        public void IsMatch_Inside( )
        {
            var netRoute = new SUTest(
                new NetIpAddress(124, 102, 0, 0),
                new NetIpAddress(255, 255, 0, 0),
                new NetIpAddress(172, 144, 11, 201));

            var netIpAddressInside = new NetAddress(
                new NetIpAddress(124, 102, 11, 7),
                new NetIpAddress(255, 255, 0, 0));

            Assert.AreEqual(true, netRoute.IsMatch(netIpAddressInside));
        }
예제 #3
0
        public void IsMatch_InsideBeforeOutside( )
        {
            var netRoute = new SUTest(
                new NetIpAddress(124, 102, 0, 0),
                new NetIpAddress(255, 255, 0, 0),
                new NetIpAddress(172, 144, 11, 201));

            var netIpAddressInsideBeforeOutside = new NetAddress(
                new NetIpAddress(124, 102, 255, 255),
                new NetIpAddress(255, 255, 0, 0));

            Assert.AreEqual(true, netRoute.IsMatch(netIpAddressInsideBeforeOutside));
        }
예제 #4
0
        public void IsMatch_OutsideBefore( )
        {
            var netRoute = new SUTest(
                new NetIpAddress(124, 102, 0, 0),
                new NetIpAddress(255, 255, 0, 0),
                new NetIpAddress(172, 144, 11, 201));

            var netIpAddressOutsideBefore = new NetAddress(
                new NetIpAddress(124, 101, 255, 254),
                new NetIpAddress(255, 255, 0, 0));

            Assert.AreEqual(false, netRoute.IsMatch(netIpAddressOutsideBefore));
        }