コード例 #1
0
        public void Compute_next_open_day_over_bank_holliday()
        {
            var calendar = new MiniCalendar();

            calendar.AddBankHolliday(new DateTime(2015, 4, 9));
            Assert.AreEqual(new DateTime(2015, 4, 10), calendar.NextOpenDay(new DateTime(2015, 4, 8)));
        }
コード例 #2
0
        public void Bank_hollidays_are_closed()
        {
            var calendar = new MiniCalendar();

            calendar.AddBankHolliday(new DateTime(2015, 4, 8));
            Assert.IsFalse(calendar.IsOpen(new DateTime(2015, 4, 8)));
        }
コード例 #3
0
        public void Weekend_are_closed()
        {
            var calendar = new MiniCalendar();

            Assert.IsTrue(calendar.IsOpen(new DateTime(2015, 4, 10)));
            Assert.IsFalse(calendar.IsOpen(new DateTime(2015, 4, 11)));
            Assert.IsFalse(calendar.IsOpen(new DateTime(2015, 4, 12)));
        }
コード例 #4
0
        public void Regular_days_are_open()
        {
            var calendar = new MiniCalendar();

            Assert.IsTrue(calendar.IsOpen(new DateTime(2014, 4, 8)));
        }
コード例 #5
0
        public void Compute_next_open_day_over_weekend()
        {
            var calendar = new MiniCalendar();

            Assert.AreEqual(new DateTime(2015, 4, 13), calendar.NextOpenDay(new DateTime(2015, 4, 10)));
        }
コード例 #6
0
        public void Compute_next_open_day()
        {
            var calendar = new MiniCalendar();

            Assert.AreEqual(new DateTime(2015, 4, 9), calendar.NextOpenDay(new DateTime(2015, 4, 8)));
        }