示例#1
0
        public void LoadHolidays_ReturnsTrue_ForDateAddedAsListItem()
        {

            //Arrange
            HolidaysManager manager = new HolidaysManager();
            List<DateTime> holidays = new List<DateTime>();
            holidays.Add(new DateTime(2017, 5, 1));
            holidays.Add(new DateTime(2017, 5, 3));
            holidays.Add(new DateTime(2017, 11, 11));
            DateTime checkedDate = new DateTime(2017, 5, 2);

            //Act
            manager.LoadHolidays(holidays);

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

        }