/// <summary> /// The method validates whether a supplied object has a length greater than supplied minimum length. /// </summary> /// <param name="objectToValidate">An object to be valdiated.</param> /// <returns>True - if object is valid, false - if object is invalid.</returns> public override bool Validate(object objectToValidate) { return(ValidateDataProperties.IsGreaterThanMinLength(objectToValidate, controlLength)); }
public void ShouldReturnFalseForObject() { object testObject = new object(); Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testObject, controlLength)); }
public void ShouldReturnFalseForValidatableObject() { MinLengthValidatableObjectFalse testValidatableObject = new MinLengthValidatableObjectFalse(); Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValidatableObject, controlLength)); }
public void ShouldReturnFalseForStringValue() { testValueString = "Length less than 20!!!!"; Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueString, controlLengthString)); }
public void ShouldReturnTrueForStringValue() { Assert.IsTrue(ValidateDataProperties.IsGreaterThanMinLength(testValueString, controlLengthString)); }
public void ShouldReturnFalseForDecimalValue() { testValueDecimal = 1M; Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueDecimal, controlLength)); }
public void ShouldReturnFalseForDoubleValue() { testValueDouble = 1F; Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueDouble, controlLength)); }
public void ShouldReturnFalseForIntValue() { testValueInt = 1; Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueInt, controlLength)); }