示例#1
0
        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());
        }
示例#2
0
        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));
        }
示例#3
0
        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);
        }