public ActionResult DeletePolicy(Policy policy)
        {
            PolicyGrinder grinder = PolicyGrinderFactory.Synthesize();

            grinder.DeletePolicy(policy);
            return(RedirectToAction("ManagePolicies"));
        }
Beispiel #2
0
        public void CanDeletePolicy(string name, string content, bool expectedResults)
        {
            PolicyGrinder grinder = PolicyGrinderFactory.Synthesize();
            Policy        policy  = new Policy();

            policy.Name    = name;
            policy.Content = content;
            PolicyResponse response = grinder.DeletePolicy(policy);

            Assert.AreEqual(expectedResults, response.Success);
        }