public void YearEndExtractorGetYearEndsWeekendsThrowsIfEndDateIsGreaterThanStartDate() { DateTime start = new DateTime(2018, 11, 27); DateTime end = new DateTime(2006, 08, 08); Assert.Throws <ArgumentException>(() => YearEndExtractor.GetWeekendsYearEnds(start, end).ToList()); }
public void YearEndExtractorGetsYearEndOccurringOnEndDate() { DateTime start = new DateTime(2008, 08, 08); DateTime end = new DateTime(2018, 12, 31); var yearEnds = YearEndExtractor.GetYearEnds(start, end).ToList(); Assert.IsTrue(yearEnds.Contains(end)); }
public void YearEndExtractorGetsWeekendYearEnds() { DateTime start = new DateTime(2008, 08, 08); DateTime end = new DateTime(2018, 11, 27); var yearEnds = YearEndExtractor.GetWeekendsYearEnds(start, end).ToList(); Assert.IsNotNull(yearEnds); Assert.AreEqual(3, yearEnds.Count); }
public void YearEndExtractorReturnsYearEndsForFiveHundredYearWeekDaysRange() { DateTime start = new DateTime(2000, 1, 1); DateTime end = start.AddYears(500); var YearEnds = YearEndExtractor.GetWeekdayYearEnds(start, end) .ToList(); Assert.IsNotNull(YearEnds); }
public void YearEndExtractorReturnsYearEndsForTenYearRange() { DateTime start = new DateTime(2000, 1, 1); DateTime end = start.AddYears(10); var YearEnds = YearEndExtractor.GetYearEnds(start, end) .ToList(); Assert.IsNotNull(YearEnds); }