コード例 #1
0
            public void GetRemainingWorkingTimeWithHolidayShouldOnlyEnumerateWorkingTime(DateTime startTime, TimeSpan workingHours, DateTime expectedDueDate, string expectation)
            {
                // Arrange
                var service = new ServicePlannerManager(Common.MockWorkDays(), Common.MockHolidayPeriods());

                // Act
                var result = service.GetRemainingWorkingTime(startTime, expectedDueDate);

                // Assert - 
                Assert.AreEqual(workingHours.TotalHours, result.TotalHours, expectation);
            }
コード例 #2
0
            public void GetDueDateShouldOnlyEnumerateWorkingTime(
                DateTime startTime,
                TimeSpan workingHours,
                DateTime expectedDueDate,
                string expectation)
            {
                // Arrange
                var service = new ServicePlannerManager(Common.MockWorkDays(), new List<HolidayPeriod>());

                // Act
                var result = service.GetDueDate(startTime, workingHours);

                // Assert - 
                Assert.AreEqual(expectedDueDate, result, expectation);
            }