public void Given_daily_schedule() { var schedule = new DailyJobSchedule(new TimeSpan(12, 0, 0)); var context = new TestSchedulerContext(); context.MoveToNow(); var jobstate = new TestJobState(); nexttoday = schedule.NextExecution(jobstate, context); context.MoveToTommorrow(); nexttomorrow = schedule.NextExecution(jobstate, context); }
public void Given_work_item() { var ctx = new TestSchedulerContext(); // Make workitem think that it was created yesterday ctx.MoveToYesterday(); _item = WorkItemFactory.Create(ctx); // Now update date to today, this // will make workitem applicable for scheduling ctx.MoveToNow(); // Force workitem to reschedule _item.UpdateState(); //Console.WriteLine("bo ya:" + _item.Status); }
public void Given_daily_schedule() { var schedule = new DailyJobSchedule(new TimeSpan(12, 0, 0)); var context = new TestSchedulerContext(); context.MoveToNow(); var jobstate = new TestJobState(); nexttoday = schedule.NextExecution(jobstate, context); context.MoveToTommorrow(); nexttomorrow = schedule.NextExecution(jobstate, context); }
public void Given_work_item() { var ctx = new TestSchedulerContext(); // Make workitem think that it was created yesterday ctx.MoveToYesterday(); _item = WorkItemFactory.Create(ctx); // Now update date to today, this // will make workitem applicable for scheduling ctx.MoveToNow(); // Force workitem to reschedule _item.UpdateState(); //Console.WriteLine("bo ya:" + _item.Status); }