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

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

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

            Assert.AreEqual(new DateTime(2018, 09, 30), monthEnds[0]);
        }
コード例 #3
0
        public void MonthEndExtractorReturnsMonthEndsForFiveHundredYearWeekEndsRange()
        {
            DateTime start = new DateTime(2000, 1, 1);
            DateTime end   = start.AddYears(500);

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

            Assert.IsNotNull(monthEnds);
        }
コード例 #4
0
        public void MonthEndExtractorGetsMonthEndWeekends()
        {
            DateTime start = new DateTime(2018, 08, 08);
            DateTime end   = new DateTime(2018, 11, 27);

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

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