Пример #1
0
        public void CurrentDateTimeExactlyOneDayAfterWindowEndDate_IsAfterWindow()
        {
            var endDate     = new DateTime(2016, 07, 01, 0, 0, 0);
            var currentDate = new DateTime(2016, 07, 02, 0, 0, 0);

            var quarterWindow = new QuarterWindow(A.Dummy <DateTime>(), endDate, QuarterType.Q1);

            var result = quarterWindow.IsAfterWindow(currentDate);

            Assert.True(result);
        }
        public void CurrentDateTimeExactlyOneDayAfterWindowEndDate_IsAfterWindow()
        {
            var endDate = new DateTime(2016, 07, 01, 0, 0, 0);
            var currentDate = new DateTime(2016, 07, 02, 0, 0, 0);

            var quarterWindow = new QuarterWindow(A.Dummy<DateTime>(), endDate);

            var result = quarterWindow.IsAfterWindow(currentDate);

            Assert.True(result);
        }
Пример #3
0
        public void CurrentDateTimeIsOneSecondBeforeDayAfterWindowEndDate_IsNotAfterWindow()
        {
            var endDate     = new DateTime(2016, 07, 01, 0, 0, 0);
            var currentDate = new DateTime(2016, 07, 01, 23, 59, 59);

            var quarterWindow = new QuarterWindow(A.Dummy <DateTime>(), endDate, QuarterType.Q1);

            var result = quarterWindow.IsAfterWindow(currentDate);

            Assert.False(result);
        }
        public void CurrentDateTimeIsOneSecondBeforeDayAfterWindowEndDate_IsNotAfterWindow()
        {
            var endDate = new DateTime(2016, 07, 01, 0, 0, 0);
            var currentDate = new DateTime(2016, 07, 01, 23, 59, 59);

            var quarterWindow = new QuarterWindow(A.Dummy<DateTime>(), endDate);

            var result = quarterWindow.IsAfterWindow(currentDate);

            Assert.False(result);
        }