public void CheckDictionary() { var frenchPublicHolidaysCalculator = new Mock <IPublicHolidaysCalculator>(); var calculator = new WorkingDaysCalculator(frenchPublicHolidaysCalculator.Object); calculator.GetWorkingDaysByMonth(2012, 1); calculator.GetWorkingDaysByMonth(2012, 1); calculator.GetWorkingDaysByMonth(2012, 1); frenchPublicHolidaysCalculator.Verify(e => e.GetPublicHolidays(2012), Times.Once); }
public void Test(int year, int month, int expectedWorkingDays) { var calculator = new WorkingDaysCalculator(new FrenchPublicHolidaysCalculator()); var workingDays = calculator.GetWorkingDaysByMonth(year, month); Assert.Equal(expectedWorkingDays, workingDays); }