public ActionResult DeleteThatCategory(string categoryName)
        {
            PolicyGrinder grinder = PolicyGrinderFactory.Synthesize();

            grinder.DeleteCategory(categoryName);
            return(RedirectToAction("ViewCategories"));
        }
Beispiel #2
0
        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);
        }