public void ShouldSupportAddANewTAskWithoutDuDate() { var validateDate = new VerifierDateAndDueDate(null, null); var taskDuDate = validateDate.VerifyDueTempDate(); Assert.AreEqual(null, taskDuDate); }
public void ShouldSupportAddANewTaskWithDuDateGreaterThenDate() { var validateDate = new VerifierDateAndDueDate("10-11-2015", "11-11-2015"); var taskDuDate = validateDate.VerifyDueDate(); taskDuDate.ShouldBeTrue(); }
public void ShouldSupportADefalutDateForTask() { var validateDate = new VerifierDateAndDueDate(null); var taskDate = validateDate.VerifyTempDate(); Assert.AreEqual(DateTime.Now.Date, taskDate.Date); }
public void ShouldNotSupportAddANewTaskWithDuDateLessThenDate() { var validateDate = new VerifierDateAndDueDate("10-11-2015", "9-10-2015"); var taskDuDate = validateDate.VerifyDueDate(); taskDuDate.ShouldBeFalse(); }
public void ShouldNotSupportAddAInvalidDateTimeForTaskAndShouldReplaceWithCurrentDateTime() { var validateDate = new VerifierDateAndDueDate("34-45-2015"); var expectedresult = DateTime.Today.Date; expectedresult.ToString("tt", CultureInfo.InvariantCulture); var taskDate = validateDate.VerifyTempDate(); Assert.AreEqual(expectedresult, taskDate.Date); }
public void ShouldSupportASpecifiedDateForTask() { var validateDate = new VerifierDateAndDueDate("10-11-2015"); var expectedresult = new DateTime(2015, 10, 11, 00, 00, 00); expectedresult.ToString("tt", CultureInfo.InvariantCulture); var taskDate = validateDate.VerifyTempDate(); Assert.AreEqual(expectedresult, taskDate.Date); }