示例#1
0
        public void ShouldSupportAddANewTAskWithoutDuDate()
        {
            var validateDate = new VerifierDateAndDueDate(null, null);
            var taskDuDate   = validateDate.VerifyDueTempDate();

            Assert.AreEqual(null, taskDuDate);
        }
示例#2
0
        public void ShouldSupportAddANewTaskWithDuDateGreaterThenDate()
        {
            var validateDate = new VerifierDateAndDueDate("10-11-2015", "11-11-2015");
            var taskDuDate   = validateDate.VerifyDueDate();

            taskDuDate.ShouldBeTrue();
        }
示例#3
0
        public void ShouldSupportADefalutDateForTask()
        {
            var validateDate = new VerifierDateAndDueDate(null);
            var taskDate     = validateDate.VerifyTempDate();

            Assert.AreEqual(DateTime.Now.Date, taskDate.Date);
        }
示例#4
0
        public void ShouldNotSupportAddANewTaskWithDuDateLessThenDate()
        {
            var validateDate = new VerifierDateAndDueDate("10-11-2015", "9-10-2015");
            var taskDuDate   = validateDate.VerifyDueDate();

            taskDuDate.ShouldBeFalse();
        }
示例#5
0
 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);
 }
示例#6
0
        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);
        }
示例#7
0
        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);
        }
示例#8
0
 public void ShouldSupportADefalutDateForTask()
 {
     var validateDate = new VerifierDateAndDueDate(null);
     var taskDate = validateDate.VerifyTempDate();
     Assert.AreEqual(DateTime.Now.Date, taskDate.Date);
 }
示例#9
0
 public void ShouldSupportAddANewTAskWithoutDuDate()
 {
     var validateDate = new VerifierDateAndDueDate(null, null);
     var taskDuDate = validateDate.VerifyDueTempDate();
     Assert.AreEqual(null, taskDuDate);
 }
示例#10
0
 public void ShouldSupportAddANewTaskWithDuDateGreaterThenDate()
 {
     var validateDate = new VerifierDateAndDueDate("10-11-2015", "11-11-2015");
     var taskDuDate = validateDate.VerifyDueDate();
     taskDuDate.ShouldBeTrue();
 }
示例#11
0
 public void ShouldNotSupportAddANewTaskWithDuDateLessThenDate()
 {
     var validateDate = new VerifierDateAndDueDate("10-11-2015", "9-10-2015");
     var taskDuDate = validateDate.VerifyDueDate();
     taskDuDate.ShouldBeFalse();
 }
示例#12
0
 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);
 }