public void If_ipv4_is_mapped_to_ipv6_Then_reduced_values_are_same() { var ipv4 = IPAddress.Parse("142.52.77.134"); var ipv6 = ipv4.MapToIPv6(); var reducedIpv4 = new ReducedIpAddress(ipv4); var reducedIpv6 = new ReducedIpAddress(ipv6); Assert.That(reducedIpv6.ReducedIpValue, Is.EqualTo(reducedIpv4.ReducedIpValue)); }
public void If_ipv6_has_same_64_bit_subnet_Then_reduced_values_are_same(string ipAddress) { var reducedIp = new ReducedIpAddress(IPAddress.Parse(ipAddress)); Assert.That(reducedIp.ReducedIpValue, Is.EqualTo(9120338691296830918)); }
public void If_ip_is_localhost_Then_reduced_values_are_same(string ipAddress) { var reducedIp = new ReducedIpAddress(IPAddress.Parse(ipAddress)); Assert.That(reducedIp.ReducedIpValue, Is.EqualTo(1328304962299559429UL)); }
public void If_ip_is_null_Then_reduced_value_is_zero() { var reducedIp = new ReducedIpAddress(null); Assert.That(reducedIp.ReducedIpValue, Is.EqualTo(0)); }