public void MonthEndExtractorGetsMonthEndsWeekendsThrowsIfStartDateIsGreaterThanEndDate() { DateTime start = new DateTime(2018, 11, 27); DateTime end = new DateTime(2018, 08, 08); Assert.Throws <ArgumentException>(() => MonthEndExtractor.GetWeekendsMonthEnds(start, end).ToList()); }
public void MonthEndExtractorGetsExpectedMonthEndWeekends() { DateTime start = new DateTime(2018, 08, 08); DateTime end = new DateTime(2018, 11, 27); var monthEnds = MonthEndExtractor.GetWeekendsMonthEnds(start, end).ToList(); Assert.AreEqual(new DateTime(2018, 09, 30), monthEnds[0]); }
public void MonthEndExtractorReturnsMonthEndsForFiveHundredYearWeekEndsRange() { DateTime start = new DateTime(2000, 1, 1); DateTime end = start.AddYears(500); var monthEnds = MonthEndExtractor.GetWeekendsMonthEnds(start, end) .ToList(); Assert.IsNotNull(monthEnds); }
public void MonthEndExtractorGetsMonthEndWeekends() { DateTime start = new DateTime(2018, 08, 08); DateTime end = new DateTime(2018, 11, 27); var monthEnds = MonthEndExtractor.GetWeekendsMonthEnds(start, end).ToList(); Assert.IsNotNull(monthEnds); Assert.AreEqual(1, monthEnds.Count); }