Пример #1
0
        public void FixedDateHolidayTest()
        {
            var fixedHoliday = new FixedDateHoliday(1, 05);
            var observedDate = fixedHoliday.GetObservedDate(2022);

            var expectedDate = new DateTime(2022, 01, 05);

            observedDate.Should().Be(expectedDate);
        }
Пример #2
0
        public PublicHolidayProvider()
        {
            var newYearDay     = new AdjustableDateHoliday(1, 1);
            var australiaDay   = new AdjustableDateHoliday(1, 26);
            var Azec           = new FixedDateHoliday(5, 25);
            var queensBirthday = new MovableDateHoliday(6, 2, DayOfWeek.Monday);

            _publicHolidays = new List <BaseHoliday> {
                newYearDay,
                australiaDay,
                Azec,
                queensBirthday
            };
        }