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

            Assert.Throws <ArgumentException>(() => MonthEndExtractor.GetMonthEnds(start, end).ToList());
        }
Ejemplo n.º 2
0
        public void MonthEndExtractorGetsMonthEndOccurringOnEndDate()
        {
            DateTime start = new DateTime(2018, 08, 08);
            DateTime end   = new DateTime(2018, 11, 30);

            var monthEnds = MonthEndExtractor.GetMonthEnds(start, end).ToList();

            Assert.IsTrue(monthEnds.Contains(end));
        }
Ejemplo n.º 3
0
        public void MonthEndExtractorReturnsMonthEndsForFiveHundredYearRange()
        {
            DateTime start = new DateTime(2000, 1, 1);
            DateTime end   = start.AddYears(500);

            var monthEnds = MonthEndExtractor.GetMonthEnds(start, end)
                            .ToList();

            Assert.IsNotNull(monthEnds);
        }
Ejemplo n.º 4
0
        public void MonthEndExtractorGetsMonthEnds()
        {
            DateTime start = new DateTime(2018, 08, 08);
            DateTime end   = new DateTime(2018, 11, 27);

            var monthEnds = MonthEndExtractor.GetMonthEnds(start, end).ToList();

            Assert.IsNotNull(monthEnds);
            Assert.AreEqual(3, monthEnds.Count);
        }
Ejemplo n.º 5
0
        public void MonthEndExtractorGetsExpectedMonthEnds()
        {
            DateTime start = new DateTime(2018, 08, 08);
            DateTime end   = new DateTime(2018, 11, 27);

            var monthEnds = MonthEndExtractor.GetMonthEnds(start, end).ToList();

            Assert.AreEqual(new DateTime(2018, 08, 31), monthEnds[0]);
            Assert.AreEqual(new DateTime(2018, 09, 30), monthEnds[1]);
            Assert.AreEqual(new DateTime(2018, 10, 31), monthEnds[2]);
        }