public void WhenCalledWithInvalidIpAddressFormatShouldThrowException(string invalidIpAddress) { Assert.Throws <ArgumentException>(() => { IpAddressHelper.Ipv4FromString(invalidIpAddress); }); }
public void WhenCalledWithValidIpAddressShouldReturnLongThatIsNotNull(string validIpAddress) { Assert.DoesNotThrow(() => { long address = IpAddressHelper.Ipv4FromString(validIpAddress); Assert.IsNotNull(address); }); }
public void WhenCalledWithValidIpAddressShouldReturnValidInt64Representation(string validIpAddress, long expectedResultAddress) { long ipAddress = IpAddressHelper.Ipv4FromString(validIpAddress); Assert.AreEqual(expectedResultAddress, ipAddress); }