public void TestHandleCancel_Unhandleable_NoSuccessor() { JobQueue queue = new JobQueue(); bool result = queue.Handle(null); Assert.IsFalse(result); }
public void TestHandleCancel_Handleable() { JobQueue queue = new JobQueue(); IJobDefinition d = new DudDefinition(); JobRequest r = new JobRequest(d); JobTicket t = new JobTicket(r, new DudHandler()); queue.Enqueue(t); bool result = queue.Handle(t); Assert.IsTrue(result); Assert.IsFalse(queue.HasPendingJobs); }