public void Validate_LengthRange_Correctly(string value, uint longer, uint shorter, bool expected) { //Arrange IValueValidator <string> validator = new LongerValidator(longer, new ShorterValidator(shorter)); //Act bool valid = validator.IsValid(value); //Assert Assert.Equal(expected, valid); }
/// <summary> /// Specifies the length the target must exceed. /// </summary> /// <param name="length">The length that must be exceeded.</param> public LongerThanAttribute(uint length) { _length = length; _validator = new LongerValidator(length); }