public void ShouldReturnBadRequestIfJobQueueItemHasInvalidCreatedByValue()
        {
            var jobQueueItem = new JobQueueItem
            {
                Name       = "Name",
                Serialized = "Serialized",
                Type       = "Type",
                CreatedBy  = string.Empty
            };

            var response = ManagerController.AddItemToJobQueue(jobQueueItem);

            Assert.IsInstanceOf(typeof(BadRequestErrorMessageResult), response);
        }
Example #2
0
        public void ShouldBeAbleToPersistNewJobQueueItem()
        {
            var jobQueueItem = new JobQueueItem
            {
                Name       = "Name Test",
                CreatedBy  = "Created By Test",
                Serialized = "Serialized Test",
                Type       = "Type Test"
            };

            ManagerController.AddItemToJobQueue(jobQueueItem);

            JobRepository.GetAllItemsInJobQueue().Count.Should().Be.EqualTo(1);
        }