public void Should_not_validate_when_non_numeric_characters_are_present() { var value = "12345abd"; var validationRule = new NumericInputOnlyValidationRule(); var result = validationRule.Validate(value, null); Assert.IsFalse(result.IsValid); Assert.IsNotNull(result.ErrorContent); }
public void Should_validate_only_numeric_values_present() { var value = "1234567890"; var validationRule = new NumericInputOnlyValidationRule(); var result = validationRule.Validate(value, null); Assert.IsTrue(result.IsValid); }