Beispiel #1
0
        public void testAdd5DaysBeforeNationalDay()
        {
            var date    = new DateTime(2007, 5, 16);
            var newDate = NorwegianDateUtil.AddWorkingDaysToDate(date, 5);

            Assert.Equal(24, newDate.Day);
        }
Beispiel #2
0
        public void testAdd5DaysBeforeEasterHoliday()
        {
            var date    = new DateTime(2007, 4, 4);
            var newDate = NorwegianDateUtil.AddWorkingDaysToDate(date, 5);

            Assert.Equal(16, newDate.Day);
        }
Beispiel #3
0
        public void testAdd5DaysWithNoHolidays()
        {
            var date    = new DateTime(2007, 03, 21);
            var newDate = NorwegianDateUtil.AddWorkingDaysToDate(date, 5);

            Assert.Equal(28, newDate.Day);
        }
Beispiel #4
0
        public void testAdd2DaysWithinSameWeek()
        {
            var date    = new DateTime(2007, 3, 21);
            var newDate = NorwegianDateUtil.AddWorkingDaysToDate(date, 2);

            Assert.Equal(23, newDate.Day);
        }
Beispiel #5
0
        public void testAdd2DaysToLastDayOfMonth()
        {
            var date    = new DateTime(2007, 2, 28);
            var newDate = NorwegianDateUtil.AddWorkingDaysToDate(date, 2);

            Assert.Equal(2, newDate.Day);
            Assert.Equal(3, newDate.Month);
        }
Beispiel #6
0
        public void testAdd5DaysBeforeChristmas()
        {
            var date    = new DateTime(2007, 12, 21);
            var newDate = NorwegianDateUtil.AddWorkingDaysToDate(date, 5);

            Assert.Equal(2, newDate.Day);
            Assert.Equal(1, newDate.Month);
            Assert.Equal(2008, newDate.Year);
        }