예제 #1
0
        public void ShouldBeAbleToCancelJobOnNode()
        {
            var jobQueueItem = new JobQueueItem
            {
                JobId      = Guid.NewGuid(),
                Name       = "Name Test",
                CreatedBy  = "Created By Test",
                Serialized = "Serialized Test",
                Type       = "Type Test"
            };

            NodeRepository.AddWorkerNode(_workerNode);

            JobRepository.AddItemToJobQueue(jobQueueItem);

            JobRepository.AssignJobToWorkerNode();

            HttpSender.CallToWorkerNodes.Clear();
            ManagerController.CancelJobByJobId(jobQueueItem.JobId);

            HttpSender.CallToWorkerNodes.Count.Should().Be.EqualTo(1);
        }
예제 #2
0
 public void AddItemToJobQueue(JobQueueItem jobQueueItem)
 {
     _jobRepository.AddItemToJobQueue(jobQueueItem);
 }