public void GetNext_ReturnsProperValue_ForWeekendValue() { //Arrange DaysProcessor processor = new DaysProcessor(); DateTime baseDate = new DateTime(2017, 4, 30, 16, 0, 0); //Act DateTime actualDateTime = processor.GetNext(baseDate, 1); //Assert DateTime expectedDateTime = new DateTime(2017, 5, 1, 0, 0, 0); Assert.AreEqual(expectedDateTime, actualDateTime); }
public void GetNext_ReturnsProperValue_ForTimestampOnPeriodEdge() { //Arrange DaysProcessor processor = new DaysProcessor(); DateTime baseDate = new DateTime(2017, 5, 3, 0, 0, 0); //Act DateTime actualDateTime = processor.GetNext(baseDate, 1); //Assert DateTime expectedDateTime = new DateTime(2017, 5, 4, 0, 0, 0); Assert.AreEqual(expectedDateTime, actualDateTime); }
public void GetNext_ReturnsProperValue_ForLastWeekQuotationIfMondayIsHoliday() { //Arrange DaysProcessor processor = new DaysProcessor(); processor.AddHoliday(new DateTime(2017, 5, 8, 0, 0, 0)); DateTime baseDate = new DateTime(2017, 5, 5, 0, 0, 0); //Act DateTime actualDateTime = processor.GetNext(baseDate, 1); //Assert DateTime expectedDateTime = new DateTime(2017, 5, 9, 0, 0, 0); Assert.AreEqual(expectedDateTime, actualDateTime); }