public void isTimeAfterHolidayEveMarketClose_ReturnsTrue_IfNextDayIsHolidayAndItIsAfterBreak() { //Arrange HolidaysManager manager = new HolidaysManager(); manager.AddHoliday(new DateTime(2017, 5, 3)); manager.SetHolidayEveBreak(new TimeSpan(3, 0, 0)); //Act DateTime checkedDate = new DateTime(2017, 5, 2, 23, 0, 0); //Assert bool isTimeAfterHolidayEveMarketClose = manager.IsHolidayEveAfterMarketClose(checkedDate); Assert.IsTrue(isTimeAfterHolidayEveMarketClose); }
public void IsWorkingTime_ReturnsFalse_ForWorkingDayBeforeHolidayAfterEveningBreak() { //Arrange HolidaysManager manager = new HolidaysManager(); DateTime checkedDate = new DateTime(2017, 5, 3, 21, 15, 0); //Act manager.AddHoliday(new DateTime(2017, 5, 4)); manager.SetHolidayEveBreak(new TimeSpan(3, 0, 0)); //Assert bool isWorkingTime = manager.IsWorkingTime(checkedDate); Assert.IsFalse(isWorkingTime); }