Exemplo n.º 1
0
        public void YearEndExtractorGetYearEndsThrowsIfEndDateIsGreaterThanStartDate()
        {
            DateTime start = new DateTime(2018, 11, 27);
            DateTime end   = new DateTime(2006, 08, 08);

            Assert.Throws <ArgumentException>(() => YearEndExtractor.GetYearEnds(start, end).ToList());
        }
Exemplo n.º 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));
        }
Exemplo n.º 3
0
        public void YearEndExtractorGetsYearEnds()
        {
            DateTime start = new DateTime(2008, 08, 08);
            DateTime end   = new DateTime(2018, 11, 27);

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

            Assert.IsNotNull(yearEnds);
            Assert.AreEqual(10, yearEnds.Count);
        }
        public void YearEndExtractorReturnsYearEndsForFiveHundredYearRange()
        {
            DateTime start = new DateTime(2000, 1, 1);
            DateTime end   = start.AddYears(500);

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

            Assert.IsNotNull(YearEnds);
        }