Example #1
0
 public void ShouldReturnFalseForIncorrectString()
 {
     Assert.IsFalse(ValidateData.IsInteger(incorrectTestString));
 }
Example #2
0
        public void ShouldReturnFalseForEmptyObject()
        {
            object emptyObject = new object();

            Assert.IsFalse(ValidateData.IsInteger(emptyObject));
        }
Example #3
0
 public void ShouldReturnTrueForCorrectString()
 {
     Assert.IsTrue(ValidateData.IsInteger(correctTestString));
 }
Example #4
0
 public void ShouldReturnTrueForInt()
 {
     Assert.IsTrue(ValidateData.IsInteger(testValueInt));
 }
Example #5
0
 public void ShouldReturnTrueForDecimal()
 {
     Assert.IsTrue(ValidateData.IsInteger(testValueDecimal));
 }
Example #6
0
 public void ShouldReturnTrueForDouble()
 {
     Assert.IsTrue(ValidateData.IsInteger(testValueDouble));
 }
 /// <summary>
 /// The method validates whether a supplied object is a valid integer.
 /// </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(ValidateData.IsInteger(objectToValidate));
 }