public void GivenHolidayList_BusinessDayCalculation_ShouldNotIncludeHolidays(int expectedBusinessDayResult, string fromDate, string toDate, IList <string> holidays) { var holidayDates = holidays.Select(DateTime.Parse).ToList(); var businessDays = _businessDayCounter.BusinessDaysBetweenTwoDates(DateTime.Parse(fromDate), DateTime.Parse(toDate), holidayDates); Assert.Equal(expectedBusinessDayResult, businessDays); }
public void GivenHolidayOnSpecificDay_BusinessDayCalculation_ShouldBeCorrect(int expectedBusinessDayResult, string fromDate, string toDate, IPublicHoliday[] publicHolidays) { var businessDays = _businessDayCounter.BusinessDaysBetweenTwoDates(DateTime.Parse(fromDate), DateTime.Parse(toDate), publicHolidays.ToList()); Assert.Equal(expectedBusinessDayResult, businessDays); }