Exemple #1
0
        private void QueueDefaultTask()
        {
            var taskTests = new TaskTests(database);

            taskTests.Initialise();
            taskTests.CreateTask();
        }
 public void CompleteDependedOnTask()
 {
     var taskTests = new TaskTests(database);
     taskTests.Initialise();
     taskTests.AddDependency();
     var dequeuedTask = Queue.Dequeue(database, DefaultQueueName);
     Queue.Complete(database, dequeuedTask.WorkflowName, dequeuedTask.TaskName);
     var queue = Queue.Get(database, DefaultQueueName);
     Assert.AreEqual(0, queue.RunningTasks.Count);
     Assert.AreEqual(1, queue.QueuedTasks.Count);
     Assert.AreEqual(TaskState.Completed, Task.Get(database, dequeuedTask.WorkflowName, dequeuedTask.TaskName).State);
     Assert.AreEqual(TaskState.Queued, Task.Get(database, WorkflowTests.DefaultWorkflowName, TaskTests.DefaultTaskName).State);
 }
Exemple #3
0
        public void CompleteDependedOnTask()
        {
            var taskTests = new TaskTests(database);

            taskTests.Initialise();
            taskTests.AddDependency();
            var dequeuedTask = Queue.Dequeue(database, DefaultQueueName);

            Queue.Complete(database, dequeuedTask.WorkflowName, dequeuedTask.TaskName);
            var queue = Queue.Get(database, DefaultQueueName);

            Assert.AreEqual(0, queue.RunningTasks.Count);
            Assert.AreEqual(1, queue.QueuedTasks.Count);
            Assert.AreEqual(TaskState.Completed, Task.Get(database, dequeuedTask.WorkflowName, dequeuedTask.TaskName).State);
            Assert.AreEqual(TaskState.Queued, Task.Get(database, WorkflowTests.DefaultWorkflowName, TaskTests.DefaultTaskName).State);
        }
 private void QueueDefaultTask()
 {
     var taskTests = new TaskTests(database);
     taskTests.Initialise();
     taskTests.CreateTask();
 }