public void TestNextTaskSequencing()
 {
     SchedulerManager scheduler = new SchedulerManager(mockServer.Object);
     ScheduleTask taskA = new ScheduleTask("*", 6, 0);
     ScheduleTask taskB = new ScheduleTask("*", 5, 0);
     scheduler.AddTask(taskA);
     scheduler.AddTask(taskB);
     Assert.That(scheduler.NextTask, Is.Not.EqualTo(taskA));
     Assert.That(scheduler.NextTask, Is.EqualTo(taskB));
 }
Exemplo n.º 2
0
        public void TestNextTaskSequencing()
        {
            SchedulerManager scheduler = new SchedulerManager(mockServer.Object);
            ScheduleTask     taskA     = new ScheduleTask("*", 6, 0);
            ScheduleTask     taskB     = new ScheduleTask("*", 5, 0);

            scheduler.AddTask(taskA);
            scheduler.AddTask(taskB);
            Assert.That(scheduler.NextTask, Is.Not.EqualTo(taskA));
            Assert.That(scheduler.NextTask, Is.EqualTo(taskB));
        }
 public void TestCanAddTask()
 {
     SchedulerManager scheduler = new SchedulerManager(mockServer.Object);
     ScheduleTask task = new ScheduleTask("*", 5, 0);
     scheduler.AddTask(task);
     Console.WriteLine(string.Format("nextTask() is at {0}", scheduler.NextTask.NextRun));
     Assert.That(scheduler.NextTask, Is.EqualTo(task));
 }
Exemplo n.º 4
0
        public void TestCanAddTask()
        {
            SchedulerManager scheduler = new SchedulerManager(mockServer.Object);
            ScheduleTask     task      = new ScheduleTask("*", 5, 0);

            scheduler.AddTask(task);
            Console.WriteLine(string.Format("nextTask() is at {0}", scheduler.NextTask.NextRun));
            Assert.That(scheduler.NextTask, Is.EqualTo(task));
        }