Esempio n. 1
0
        public void NeedsExecuting_With_Untyped_Cron_Job_Is_True()
        {
            var christmas    = new DateTime(2020, 12, 25, 0, 0, 10, DateTimeKind.Utc);
            var scheduledJob = new ScheduledJob("*/10 * * * * *", _dummyHandler, OverlapHandling.Allow);
            var next         = scheduledJob.NeedsExecuting(christmas);

            Assert.IsTrue(next ?? false);
        }
Esempio n. 2
0
        public void NeedsExecuting_With_Typed_Cron_Job_Is_True()
        {
            var christmas    = new DateTime(2020, 12, 25, 0, 0, 10, DateTimeKind.Utc);
            var scheduledJob = new ScheduledJob(typeof(MockCronJob));
            var next         = scheduledJob.NeedsExecuting(christmas);

            Assert.IsTrue(next ?? false);
        }