Example #1
0
        public void Overlaps_true(string from1, string to1, string from2, string to2)
        {
            var ipRange1 = new IPRange(IPAddress.Parse(from1), IPAddress.Parse(to1));
            var ipRange2 = new IPRange(IPAddress.Parse(from2), IPAddress.Parse(to2));

            Assert.Equal(true, ipRange1.Overlaps(ipRange2));
        }
Example #2
0
        public void Overlaps_false(string from1, string to1, string from2, string to2)
        {
            var ipRange1 = new IPRange(IPAddress.Parse(from1), IPAddress.Parse(to1));
            var ipRange2 = new IPRange(IPAddress.Parse(from2), IPAddress.Parse(to2));

            Assert.Equal(false, ipRange1.Overlaps(ipRange2));
        }