public void ValidatingEmptyIpAddressFails() { var sut = new ClassWithIpAddressAttribute() { Property = string.Empty }; Assert.IsFalse(sut.IsValid()); }
public void ValidatingNullIpAddressFails() { var sut = new ClassWithIpAddressAttribute() { Property = default(string) }; Assert.IsFalse(sut.IsValid()); }
public void ValidatingIpAddressV6Succeeds() { var sut = new ClassWithIpAddressAttribute() { Property = "fe80::295c:c42d:80ce:ba26%17" }; Assert.IsTrue(sut.IsValid()); }
public void ValidatingIpAddressFails() { var sut = new ClassWithIpAddressAttribute() { Property = "XYZ" }; Assert.IsFalse(sut.IsValid()); }
public void ValidatingIpAddressV4Succeeds() { var sut = new ClassWithIpAddressAttribute() { Property = "127.0.0.1" }; Assert.IsTrue(sut.IsValid()); }