public void isTimeAfterHolidayEveMarketClose_ReturnsFalse_IfNextDayIsSunday() { //Arrange HolidaysManager manager = new HolidaysManager(); DateTime checkedDate = new DateTime(2017, 5, 6, 23, 15, 0); //Act //Assert bool isTimeAfterHolidayEveMarketClose = manager.IsHolidayEveAfterMarketClose(checkedDate); Assert.IsFalse(isTimeAfterHolidayEveMarketClose); }
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); }