示例#1
0
        public void OnNormalDay_PlusAssignmentTest1_EndDate()
        {
            TaskPlanner taskPlanner = new TaskPlanner();
            DateTime    date        = new DateTime(2017, 12, 4, 15, 7, 0);
            double      days        = 0.25;

            DateTime expected = new DateTime(2017, 12, 5, 9, 7, 0);
            DateTime result   = taskPlanner.GetFinishingDate(date, days);

            Assert.AreEqual(expected, result);
        }
示例#2
0
        public void OnNormalDay_PlusOneDayAndHoursWithWeekend_EndDate()
        {
            TaskPlanner taskPlanner = new TaskPlanner();
            DateTime    date        = new DateTime(2017, 12, 8, 11, 0, 0);
            double      days        = 1.5;

            DateTime expected = new DateTime(2017, 12, 5, 12, 0, 0);
            DateTime result   = taskPlanner.GetFinishingDate(date, days);

            Assert.AreEqual(expected, result);
        }
示例#3
0
        public void OnNormalDay_PlusDaysAndHours_EndDate()
        {
            TaskPlanner taskPlanner = new TaskPlanner();
            DateTime    date        = new DateTime(2017, 12, 4, 15, 0, 0);
            double      days        = 0.5;

            DateTime expected = new DateTime(2017, 12, 4, 12, 00, 00);
            DateTime result   = taskPlanner.GetFinishingDate(date, days);

            Assert.AreEqual(expected, result);
        }
示例#4
0
        public void OnNormalDay_PlusOneDay_EndDate()
        {
            TaskPlanner taskPlanner = new TaskPlanner();
            DateTime    date        = new DateTime(2017, 12, 4, 8, 0, 0);
            double      days        = 1.0;

            DateTime expected = new DateTime(2017, 12, 4, 16, 0, 0);
            DateTime result   = taskPlanner.GetFinishingDate(date, days);

            Assert.AreEqual(expected, result);
        }
示例#5
0
        public void OnNormalDay_PlusAssignmentTest4_EndDate()
        {
            TaskPlanner taskPlanner = new TaskPlanner();
            DateTime    date        = new DateTime(2004, 5, 24, 8, 3, 0);
            double      days        = 12.782709;

            DateTime expected = new DateTime(2017, 6, 10, 14, 18, 0);
            DateTime result   = taskPlanner.GetFinishingDate(date, days);

            Assert.AreEqual(expected, result);
        }