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

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

            Assert.IsFalse(ValidateDataProperties.IsExists(testValue));
        }
Exemplo n.º 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));
 }
Exemplo n.º 4
0
 public void ShouldReturnFalseForRangeValidatableObject()
 {
     Assert.IsFalse(ValidateDataProperties.IsWithinRange(falseObject, minValue, maxValue, false));
 }
Exemplo n.º 5
0
 public void ShouldReturnFalseForStringValue()
 {
     testValueString = "Length less than 20!!!!";
     Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueString, controlLengthString));
 }
Exemplo n.º 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));
        }
Exemplo n.º 8
0
 public void ShouldReturnFalseForDecimalValue()
 {
     testValueDecimal = 1M;
     Assert.IsFalse(ValidateDataProperties.IsGreaterThanMinLength(testValueDecimal, controlLength));
 }
Exemplo n.º 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));
 }
Exemplo n.º 11
0
        public void ShouldReturnTrueForDecimalValue()
        {
            decimal testValue = 2;

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

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

            Assert.IsFalse(ValidateDataProperties.IsWithinRange(testValue, minValue, maxValue, false));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 18
0
 public void ShouldReturnTrueForStringValue()
 {
     Assert.IsTrue(ValidateDataProperties.IsGreaterThanMinLength(testValueString, controlLengthString));
 }
        public void ShouldReturnTrueForValueType()
        {
            int testValue = 1;

            Assert.IsTrue(ValidateDataProperties.IsExists(testValue));
        }
Exemplo n.º 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));
        }
Exemplo n.º 22
0
 /// <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));
        }
Exemplo n.º 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));
 }
Exemplo n.º 25
0
        public void ShouldReturnFalseForString()
        {
            string testValue = "Some text";

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