public void ShouldReturnFalseForWhitespaceString()
        {
            string testValue = "";

            Assert.IsFalse(ValidateDataProperties.IsExists(testValue));
        }
        public void ShouldReturnFalseForReferenceType()
        {
            object testValue = new object();

            Assert.IsFalse(ValidateDataProperties.IsExists(testValue));
        }
Exemple #3
0
 /// <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));
 }
Exemple #4
0
 public void ShouldReturnFalseForRangeValidatableObject()
 {
     Assert.IsFalse(ValidateDataProperties.IsWithinRange(falseObject, minValue, maxValue, false));
 }
Exemple #5
0
 public void ShouldReturnFalseForStringValue()
 {
     testValueString = "Length less than 20!!!!";
     Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueString, controlLengthString));
 }
Exemple #6
0
        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));
        }
Exemple #8
0
 public void ShouldReturnFalseForDecimalValue()
 {
     testValueDecimal = 1M;
     Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueDecimal, controlLength));
 }
Exemple #9
0
        public void ShouldReturnTrueForDecimalValueIncluded()
        {
            decimal testValue = 10;

            Assert.IsTrue(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, true));
        }
 public void ShouldReturnTrueForDecimalValue()
 {
     Assert.IsTrue(ValidateDataProperties.IsWithinLength(testValueDecimal, controlLength));
 }
Exemple #11
0
        public void ShouldReturnTrueForDecimalValue()
        {
            decimal testValue = 2;

            Assert.IsTrue(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, false));
        }
Exemple #12
0
        public void ShouldReturnFalseForDoubleValueIncluded()
        {
            double testValue = 10;

            Assert.IsFalse(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, false));
        }
Exemple #13
0
        public void ShouldReturnFalseForIntValue()
        {
            int testValue = 12;

            Assert.IsFalse(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, false));
        }
Exemple #14
0
 public void ShouldReturnFalseForIntValue()
 {
     testValueInt = 1;
     Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueInt, controlLength));
 }
        public void ShouldReturnFalseForObject()
        {
            object testObject = new object();

            Assert.IsFalse(ValidateDataProperties.IsWithinLength(testObject, controlLengthString));
        }
Exemple #16
0
 public void ShouldReturnFalseForDoubleValue()
 {
     testValueDouble = 1F;
     Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueDouble, controlLength));
 }
        public void ShouldReturnFalseForValidatableObject()
        {
            LengthValidatableObjectFalse testValidatableObject = new LengthValidatableObjectFalse();

            Assert.IsFalse(ValidateDataProperties.IsWithinLength(testValidatableObject, 5));
        }
Exemple #18
0
 public void ShouldReturnTrueForStringValue()
 {
     Assert.IsTrue(ValidateDataProperties.IsGreaterThanMinLength(testValueString, controlLengthString));
 }
        public void ShouldReturnTrueForValueType()
        {
            int testValue = 1;

            Assert.IsTrue(ValidateDataProperties.IsExists(testValue));
        }
Exemple #20
0
        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));
        }
Exemple #24
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));
 }
Exemple #25
0
        public void ShouldReturnFalseForString()
        {
            string testValue = "Some text";

            Assert.IsFalse(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, false));
        }