Ejemplo n.º 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
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public NextTimeExpression(StubbedScheduleRule parent, DateTimeOffset next)
 {
     _parent = parent;
     _next   = next;
 }