public void TestIpAddress_SetAddressValue() { IpAddress ipAddress = new IpAddress() { AddressValue = 3 * 256 * 256 * 256 + 2 * 256 * 256 + 7 * 256 + 6 }; Assert.AreEqual(ipAddress.GetString(), "3.2.7.6"); for (int i = -1; i > -128888888; i -= 254) { ipAddress = new IpAddress() { AddressValue = i }; Assert.AreEqual(ipAddress.AddressValue, i); } }