コード例 #1
0
        public void IsDayOff_ReturnsTrue_ForWeekend()
        {

            //Arrange
            HolidaysManager manager = new HolidaysManager();
            DateTime checkedDate = new DateTime(2017, 5, 6, 11, 15, 0);

            //Act

            //Assert
            bool isDayOff = manager.IsDayOff(checkedDate);
            Assert.IsTrue(isDayOff);

        }
コード例 #2
0
        public void IsDayOff_ReturnsFalse_ForWorkingDay()
        {

            //Arrange
            HolidaysManager manager = new HolidaysManager();
            DateTime checkedDate = new DateTime(2017, 5, 2, 11, 15, 0);

            //Act

            //Assert
            bool isDayOff = manager.IsDayOff(checkedDate);
            Assert.IsFalse(isDayOff);

        }
コード例 #3
0
        public void IsDayOff_ReturnsTrue_ForWeekDayHoliday()
        {

            //Arrange
            HolidaysManager manager = new HolidaysManager();
            DateTime checkedDate = new DateTime(2017, 5, 2, 11, 15, 0);

            //Act
            manager.AddHoliday(checkedDate.Midnight());

            //Assert
            bool isDayOff = manager.IsDayOff(checkedDate);
            Assert.IsTrue(isDayOff);

        }