示例#1
0
 public void ShouldReturnFalseForIncorrectDateString()
 {
     foreach (string item in s_incorrectDateArray)
     {
         Assert.IsFalse(ValidateData.IsDateTime(item));
     }
 }
示例#2
0
 public void ShouldReturnTrueForCorrectDateString()
 {
     foreach (string item in s_correctDateArray)
     {
         Assert.IsTrue(ValidateData.IsDateTime(item));
     }
 }
示例#3
0
 public void ShouldReturnFalseForCorrectDateDecimal()
 {
     Assert.IsFalse(ValidateData.IsDateTime(dateDecimal));
 }
示例#4
0
 public void ShouldReturnTrueForCorrectDate()
 {
     Assert.IsTrue(ValidateData.IsDateTime(correctDate));
 }
 /// <summary>
 /// The method validates whether a supplied object is a valid DateTime entity.
 /// </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.IsDateTime(objectToValidate));
 }