public ViewResult Index(string q = null, int p = 1) { if (!_categoryAdminService.ProductContainerExists()) { return(View()); } IPagedList <Category> categoryPagedList = _categoryAdminService.Search(q, p); return(View(categoryPagedList)); }
public PartialViewResult SearchCategories(int page = 1, string query = "") { var items = _categoryAdminService.Search(query, page); return(PartialView(items)); }
public void CategoryController_Index_CallsSearchOnTheCategoryService() { _categoryController.Index("test", 1); A.CallTo(() => _categoryAdminService.Search("test", 1)).MustHaveHappened(); }