Esempio n. 1
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);
        }
Esempio n. 2
0
        public ActionResult Sort([IoCModelBinder(typeof(NullableEntityModelBinder))] MediaCategory parent)
        {
            List <SortItem> sortItems = _mediaCategoryAdminService.GetSortItems(parent);

            return(View(sortItems));
        }