Beispiel #1
0
        public void IncrementOverflow3()
        {
            var ipaddress = new IPv4Address("255.255.255.255");

            ipaddress = ipaddress.IncrementOne();
            Assert.AreEqual(new IPv4Address("0.0.0.0"), ipaddress);
        }
Beispiel #2
0
        public void IncrementOverflow1()
        {
            var ipaddress = new IPv4Address("192.168.1.255");

            ipaddress = ipaddress.IncrementOne();
            Assert.AreEqual(new IPv4Address("192.168.2.0"), ipaddress);
        }
Beispiel #3
0
        public void IncrementOverflow4()
        {
            var ipaddress = new IPv4Address("0.0.0.0");

            for (int a = 0; a < 256; a++)
            {
                ipaddress = ipaddress.IncrementOne();
            }
            Assert.AreEqual(new IPv4Address("0.0.1.0"), ipaddress);
        }