public ActionResult EditCategory(Category category) { var manager = new AdminManager(); manager.EditCategory(category); return RedirectToAction("CategoryIndex", "Category"); }
public void CancEditCategory() { var manager = new AdminManager(); var toEdit = manager.GetCategoryByID(manager.GetAllCategories().Count); toEdit.CategoryName = "EditedCategory"; manager.EditCategory(toEdit); var toCheck = manager.GetCategoryByID(manager.GetAllCategories().Count); Assert.AreEqual(toCheck.CategoryName,toEdit.CategoryName); }