public ActionResult DeleteThatCategory(string categoryName) { PolicyGrinder grinder = PolicyGrinderFactory.Synthesize(); grinder.DeleteCategory(categoryName); return(RedirectToAction("ViewCategories")); }
public void CanDeleteCategory(string name, bool expectedResults) { PolicyGrinder grinder = PolicyGrinderFactory.Synthesize(); Category category = new Category(); category.Name = name; CategoryResponse response = grinder.DeleteCategory(category.Name); Assert.AreEqual(expectedResults, response.Success); }