コード例 #1
0
        public void YearEndExtractorGetYearEndsWeekdaysThrowsIfEndDateIsGreaterThanStartDate()
        {
            DateTime start = new DateTime(2018, 11, 27);
            DateTime end   = new DateTime(2006, 08, 08);

            Assert.Throws <ArgumentException>(() => YearEndExtractor.GetWeekdayYearEnds(start, end).ToList());
        }
コード例 #2
0
        public void YearEndExtractorGetsWeekdayYearEnds()
        {
            DateTime start = new DateTime(2008, 08, 08);
            DateTime end   = new DateTime(2018, 11, 27);

            var yearEnds = YearEndExtractor.GetWeekdayYearEnds(start, end).ToList();

            Assert.IsNotNull(yearEnds);
            Assert.AreEqual(7, yearEnds.Count);
        }
コード例 #3
0
        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);
        }