public void Validate_Lowercase_Success() { UppercaseConstraint c = new UppercaseConstraint(); IEnumerable<ParameterValidationResult> res = c.Validate("THIS IS lowercase!", ParameterDataType.String, Constants.MemberName); Assert.IsNotNull(res); Assert.IsTrue(res.GetEnumerator().MoveNext()); }
public void Validate_Success() { UppercaseConstraint c = new UppercaseConstraint(); IEnumerable<ParameterValidationResult> res = c.Validate("SOME UPPERCASE AND 3 NUMBERS AND PUNCTUATION ...!", ParameterDataType.String, Constants.MemberName); Assert.IsNotNull(res); Assert.IsFalse(res.GetEnumerator().MoveNext()); }