Beispiel #1
0
        public void SetUp()
        {
            var rule = new StubbedScheduleRule();

            rule.ScheduledTimes[now] = theNextTimeAccordingToTheSchedulerRule;

            TheJobTracker.Stub(x => x.Now()).Return(now);

            var job = theJobIs();

            var scheduledJob = new ScheduledJob <RiggedJob>(rule);

            scheduledJob.Timeout = theConfiguredTimeout;
            theTask = scheduledJob.ToTask(job, TheJobTracker);

            try
            {
                theTask.Wait();
            }
            catch (Exception)
            {
                // okay to swallow because you'll
                // check it on task itself
            }
        }
Beispiel #2
0
        public void SetUp()
        {
            theSchedule = new JobSchedule();


            theRule = new StubbedScheduleRule();

            theRule.ScheduledTimes[now] = next;

            theExecutor = new StubJobExecutor();

            theJob = new ScheduledJob <AJob>(theRule);

            theLastRun = new JobExecutionRecord();
            theSchedule.Find(theJob.JobType)
            .LastExecution = theLastRun;

            theJob.As <IScheduledJob>().Initialize(now, theExecutor, theSchedule);
        }
Beispiel #3
0
 public NextTimeExpression(StubbedScheduleRule parent, DateTimeOffset next)
 {
     _parent = parent;
     _next   = next;
 }