Exemplo n.º 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());
        }
Exemplo n.º 2
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 YearEndExtractorReturnsYearEndsForFiveHundredYearWeekEndsRange()
        {
            DateTime start = new DateTime(2000, 1, 1);
            DateTime end   = start.AddYears(500);

            var YearEnds = YearEndExtractor.GetWeekendsYearEnds(start, end)
                           .ToList();

            Assert.IsNotNull(YearEnds);
        }