public void ShouldReturnFalseForWhitespaceString() { string testValue = ""; Assert.IsFalse(ValidateDataProperties.IsExists(testValue)); }
public void ShouldReturnFalseForReferenceType() { object testValue = new object(); Assert.IsFalse(ValidateDataProperties.IsExists(testValue)); }
/// <summary> /// The method validates whether a supplied object is not a null, whitespace or empty. /// </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.IsExists(objectToValidate)); }
public void ShouldReturnFalseForRangeValidatableObject() { Assert.IsFalse(ValidateDataProperties.IsWithinRange(falseObject, minValue, maxValue, false)); }
public void ShouldReturnFalseForStringValue() { testValueString = "Length less than 20!!!!"; Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueString, controlLengthString)); }
public void ShouldReturnFalseForValidatableObject() { MinLengthValidatableObjectFalse testValidatableObject = new MinLengthValidatableObjectFalse(); Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValidatableObject, controlLength)); }
public void ShouldReturnTrueForObject() { LengthValidatableObjectTrue testValidatableObject = new LengthValidatableObjectTrue(); Assert.IsTrue(ValidateDataProperties.IsWithinLength(testValidatableObject, 25)); }
public void ShouldReturnFalseForDecimalValue() { testValueDecimal = 1M; Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueDecimal, controlLength)); }
public void ShouldReturnTrueForDecimalValueIncluded() { decimal testValue = 10; Assert.IsTrue(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, true)); }
public void ShouldReturnTrueForDecimalValue() { Assert.IsTrue(ValidateDataProperties.IsWithinLength(testValueDecimal, controlLength)); }
public void ShouldReturnTrueForDecimalValue() { decimal testValue = 2; Assert.IsTrue(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, false)); }
public void ShouldReturnFalseForDoubleValueIncluded() { double testValue = 10; Assert.IsFalse(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, false)); }
public void ShouldReturnFalseForIntValue() { int testValue = 12; Assert.IsFalse(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, false)); }
public void ShouldReturnFalseForIntValue() { testValueInt = 1; Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueInt, controlLength)); }
public void ShouldReturnFalseForObject() { object testObject = new object(); Assert.IsFalse(ValidateDataProperties.IsWithinLength(testObject, controlLengthString)); }
public void ShouldReturnFalseForDoubleValue() { testValueDouble = 1F; Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueDouble, controlLength)); }
public void ShouldReturnFalseForValidatableObject() { LengthValidatableObjectFalse testValidatableObject = new LengthValidatableObjectFalse(); Assert.IsFalse(ValidateDataProperties.IsWithinLength(testValidatableObject, 5)); }
public void ShouldReturnTrueForStringValue() { Assert.IsTrue(ValidateDataProperties.IsGreaterThanMinLength(testValueString, controlLengthString)); }
public void ShouldReturnTrueForValueType() { int testValue = 1; Assert.IsTrue(ValidateDataProperties.IsExists(testValue)); }
public void ShouldReturnFalseForObject() { object testObject = new object(); Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testObject, controlLength)); }
public void ShouldReturnTrueForStringType() { string testValue = "Some string"; Assert.IsTrue(ValidateDataProperties.IsExists(testValue)); }
/// <summary> /// The method validates whether a supplied object is within range defined by minimum and maximum limits. /// </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.IsWithinRange(objectToValidate, minValue, maxValue, includeLimits)); }
public void ShouldReturnFalseForEmptyString() { string testValue = string.Empty; Assert.IsFalse(ValidateDataProperties.IsExists(testValue)); }
/// <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 ShouldReturnFalseForString() { string testValue = "Some text"; Assert.IsFalse(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, false)); }