Ejemplo n.º 1
0
        public void IsDayBeforeHoliday_ReturnsFalse_IfNextDayIsRegularSaturday()
        {

            //Arrange
            HolidaysManager manager = new HolidaysManager();
            DateTime checkedDate = new DateTime(2017, 5, 5, 11, 23, 34);

            //Act
            manager.AddHoliday(new DateTime(2017, 5, 3));

            //Assert
            bool isHoliday = manager.IsDayBeforeHoliday(checkedDate);
            Assert.IsFalse(isHoliday);

        }
Ejemplo n.º 2
0
        public void IsDayBeforeHoliday_ReturnsTrue_IfNextDayAfterGivenDateIsHoliday()
        {

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

            //Act
            manager.AddHoliday(new DateTime(2017, 5, 3));

            //Assert
            bool isHoliday = manager.IsDayBeforeHoliday(checkedDate);
            Assert.IsTrue(isHoliday);

        }
Ejemplo n.º 3
0
        public void IsDayBeforeHoliday_ReturnsFalse_IfGivenDayIsHolidayButNotNextOne()
        {

            //Arrange
            HolidaysManager manager = new HolidaysManager();
            DateTime checkedDate = new DateTime(2017, 5, 3, 11, 23, 34);

            //Act
            manager.AddHoliday(new DateTime(2017, 5, 3));

            //Assert
            bool isHoliday = manager.IsDayBeforeHoliday(checkedDate);
            Assert.IsFalse(isHoliday);

        }