Exemplo n.º 1
0
        public void ShouldMatchExpectedLeave(DateTime startDate, DateTime endDate, int expectedDays)
        {
            var leaveRequest = new LeaveRequest(startDate, endDate);

            leaveRequest.Days = LeaveService.CalculateLeaveDays(leaveRequest, new List <Holiday>());
            var result = LeaveService.TotalLeaveUsed(new[] { leaveRequest });

            Assert.Equal(expectedDays, result);
        }
Exemplo n.º 2
0
 public void ShouldWorkProperlyWithHolidays(LeaveRequest leaveRequest, Holiday holiday, int expectedDays)
 {
     LeaveService.CalculateLeaveDays(leaveRequest, new List <Holiday> {
         holiday
     }).ShouldBe(expectedDays);
 }