public static void Validation_ErrorMessage() { //Countries.Initialize(); var attribute = new ValidateCountryIsoAttribute(); Assert.False(attribute.IsValid("INVALID")); var t = attribute.FormatErrorMessage("ISO"); Assert.NotEmpty(t); }
public static void IsValid(string iso, bool result) { //Countries.Initialize(); var attribute = new ValidateCountryIsoAttribute { AllowEmptyStrings = true }; Assert.Equal(result, attribute.IsValid(iso)); }