Ejemplo n.º 1
0
        public void LayoutController_Sort_ShouldCallGetDocumentsByParentId()
        {
            var parent = new Layout();

            _layoutController.Sort(parent);

            A.CallTo(() => _documentService.GetDocumentsByParent(parent)).MustHaveHappened();
        }
        public void LayoutController_Sort_ShouldBeAListOfSortItems()
        {
            var layout    = new Layout();
            var sortItems = new List <SortItem> {
            };

            A.CallTo(() => _layoutAdminService.GetSortItems(layout)).Returns(sortItems);

            var viewResult = _layoutController.Sort(layout).As <ViewResult>();

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