Пример #1
0
        public void CheckDictionary2()
        {
            var frenchPublicHolidaysCalculator = new Mock <IPublicHolidaysCalculator>();
            var calculator = new WorkingDaysCalculator(frenchPublicHolidaysCalculator.Object);

            calculator.IsDayOff(new DateTime(2012, 1, 1));
            calculator.IsDayOff(new DateTime(2012, 1, 1));
            calculator.IsDayOff(new DateTime(2012, 1, 1));
            frenchPublicHolidaysCalculator.Verify(e => e.GetPublicHolidays(2012), Times.Once);
        }
Пример #2
0
        public void CheckDayOffHol()
        {
            var calculator = new WorkingDaysCalculator(new FrenchPublicHolidaysCalculator());

            Assert.True(calculator.IsDayOff(new DateTime(2017, 05, 08))); // ferié
        }
Пример #3
0
        public void CheckDayOffSaturday()
        {
            var calculator = new WorkingDaysCalculator(new FrenchPublicHolidaysCalculator());

            Assert.True(calculator.IsDayOff(new DateTime(2017, 07, 01))); // samedi
        }
Пример #4
0
        public void CheckDayOffSunday()
        {
            var calculator = new WorkingDaysCalculator(new FrenchPublicHolidaysCalculator());

            Assert.True(calculator.IsDayOff(new DateTime(2017, 07, 02))); // dimanche
        }