Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        public void CheckDayOffHol()
        {
            var calculator = new WorkingDaysCalculator(new FrenchPublicHolidaysCalculator());

            Assert.True(calculator.IsDayOff(new DateTime(2017, 05, 08))); // ferié
        }
Ejemplo n.º 3
0
        public void CheckDayOffSaturday()
        {
            var calculator = new WorkingDaysCalculator(new FrenchPublicHolidaysCalculator());

            Assert.True(calculator.IsDayOff(new DateTime(2017, 07, 01))); // samedi
        }
Ejemplo n.º 4
0
        public void CheckDayOffSunday()
        {
            var calculator = new WorkingDaysCalculator(new FrenchPublicHolidaysCalculator());

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