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

            Assert.Throws <ArgumentException>(() => MonthEndExtractor.GetWeekdayMonthEnds(start, end).ToList());
        }
Ejemplo n.º 2
0
        public void MonthEndExtractorReturnsMonthEndsForFiveHundredYearWeekDaysRange()
        {
            DateTime start = new DateTime(2000, 1, 1);
            DateTime end   = start.AddYears(500);

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

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

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

            Assert.AreEqual(new DateTime(2018, 08, 31), monthEnds[0]);
            Assert.AreEqual(new DateTime(2018, 10, 31), monthEnds[1]);
        }
Ejemplo n.º 4
0
        public void MonthEndExtractorGetsMonthEndWeekdays()
        {
            DateTime start = new DateTime(2018, 08, 08);
            DateTime end   = new DateTime(2018, 11, 27);

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

            Assert.IsNotNull(monthEnds);
            Assert.AreEqual(2, monthEnds.Count);
        }