Esempio n. 1
0
 /// <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));
 }
Esempio n. 2
0
        public void ShouldReturnFalseForObject()
        {
            object testObject = new object();

            Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testObject, controlLength));
        }
Esempio n. 3
0
        public void ShouldReturnFalseForValidatableObject()
        {
            MinLengthValidatableObjectFalse testValidatableObject = new MinLengthValidatableObjectFalse();

            Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValidatableObject, controlLength));
        }
Esempio n. 4
0
 public void ShouldReturnFalseForStringValue()
 {
     testValueString = "Length less than 20!!!!";
     Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueString, controlLengthString));
 }
Esempio n. 5
0
 public void ShouldReturnTrueForStringValue()
 {
     Assert.IsTrue(ValidateDataProperties.IsGreaterThanMinLength(testValueString, controlLengthString));
 }
Esempio n. 6
0
 public void ShouldReturnFalseForDecimalValue()
 {
     testValueDecimal = 1M;
     Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueDecimal, controlLength));
 }
Esempio n. 7
0
 public void ShouldReturnFalseForDoubleValue()
 {
     testValueDouble = 1F;
     Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueDouble, controlLength));
 }
Esempio n. 8
0
 public void ShouldReturnFalseForIntValue()
 {
     testValueInt = 1;
     Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueInt, controlLength));
 }