public void ShouldReturnFalseForIncorrectString() { Assert.IsFalse(ValidateData.IsInteger(incorrectTestString)); }
public void ShouldReturnFalseForEmptyObject() { object emptyObject = new object(); Assert.IsFalse(ValidateData.IsInteger(emptyObject)); }
public void ShouldReturnTrueForCorrectString() { Assert.IsTrue(ValidateData.IsInteger(correctTestString)); }
public void ShouldReturnTrueForInt() { Assert.IsTrue(ValidateData.IsInteger(testValueInt)); }
public void ShouldReturnTrueForDecimal() { Assert.IsTrue(ValidateData.IsInteger(testValueDecimal)); }
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)); }