Пример #1
0
        public void IsExpired_NotExpiredTest()
        {
            var now = DateTime.Now;
            var dueAt = now.AddSeconds(10).TimeOfDay;
            var StartDate = now;
            var EndDate = StartDate.AddDays(30);
            DailySchedule ds = new DailySchedule(dueAt, StartDate, EndDate);

            Assert.AreEqual(false, ds.IsExpired, "Was expecting the daily schedule to be not expired");
        }
Пример #2
0
        public void DueDate_DueTimeInPastTest()
        {
            var now = DateTime.Now;
            var dueAt = now.AddSeconds(-10).TimeOfDay;
            var StartDate = now;
            var EndDate = StartDate.AddDays(30);
            DailySchedule ds = new DailySchedule(dueAt, StartDate, EndDate);

            Assert.AreEqual(StartDate.AddDays(1).Date.Add(dueAt), ds.DueDateTime);
        }