public int ReturnWeekdaysForDateRange(DateTime firstDate, DateTime secondDate) { var sut = new BusinessDayCounter.BusinessDayCounter(); var count = sut.WeekdaysBetweenTwoDates(firstDate, secondDate); return(count); }
public int ReturnWeekdaysExceptHolidaysWithComplexHolidayStructureForDateRange( DateTime firstDate, DateTime secondDate, IList <IPublicHoliday> publicHolidays) { var sut = new BusinessDayCounter.BusinessDayCounter(); var count = sut.BusinessDaysBetweenTwoDates(firstDate, secondDate, publicHolidays); return(count); }
public void Return0WhenSecondDateIsLessThanFirstDate() { var expectedDaysCount = 0; var firstDate = new DateTime(2019, 06, 16); var secondDate = new DateTime(2019, 06, 16); var sut = new BusinessDayCounter.BusinessDayCounter(); var count = sut.WeekdaysBetweenTwoDates(firstDate, secondDate); Assert.AreEqual(expectedDaysCount, count); }