public void MediaCategoryController_Sort_ShouldCallGetDocumentsByParent()
        {
            var mediaCategory = new MediaCategory();

            _mediaCategoryController.Sort(mediaCategory);

            A.CallTo(() => _documentService.GetDocumentsByParent(mediaCategory)).MustHaveHappened();
        }
Exemple #2
0
        public void MediaCategoryController_Sort_ShouldBeAListOfSortItems()
        {
            var mediaCategory = new MediaCategory();
            var sortItems     = new List <SortItem> {
            };

            A.CallTo(() => _mediaCategoryAdminService.GetSortItems(mediaCategory)).Returns(sortItems);

            var viewResult = _mediaCategoryController.Sort(mediaCategory).As <ViewResult>();

            viewResult.Model.Should().Be(sortItems);
        }