示例#1
0
        public ViewResult Index(string q = null, int p = 1)
        {
            if (!_categoryAdminService.ProductContainerExists())
            {
                return(View());
            }
            IPagedList <Category> categoryPagedList = _categoryAdminService.Search(q, p);

            return(View(categoryPagedList));
        }
示例#2
0
        public PartialViewResult SearchCategories(int page = 1, string query = "")
        {
            var items = _categoryAdminService.Search(query, page);

            return(PartialView(items));
        }
示例#3
0
        public void CategoryController_Index_CallsSearchOnTheCategoryService()
        {
            _categoryController.Index("test", 1);

            A.CallTo(() => _categoryAdminService.Search("test", 1)).MustHaveHappened();
        }