public void should_validate_domain_name(string domainToTest) { var v = new ValidAddressAttribute(); Assert.IsTrue(v.IsValid("calebukle.com"), $"Valid domain was validated false. Expect {domainToTest} to have passed "); }
public void should_not_validate_bad_ip(string ipToTest) { var v = new ValidAddressAttribute(); Assert.IsFalse(v.IsValid(ipToTest), $"Bad IP passed that shouldn't, {ipToTest}"); Assert.IsTrue(v.IsValid("1.1.1.1"), "Valid IPv4 address was wrongly rejected!"); }