public void TestAddSimplePolicy() { string[] policyData = handler.CreateCategorySimplePolicy("Food", ConditionType.UsernameEqual, "Big Smoke"); handler.AddPolicy(Int32.Parse(policyData[0])); string[] actualData = handler.GetPolicyData(PolicyType.Category, "Food"); Assert.IsNotNull(actualData); string[] expectedData = { actualData[0], "Username", "=", "Big Smoke" }; CompareArrays(expectedData, actualData); Assert.AreEqual(0, handler.GetSessionPolicies().Length); }
public void TestCheckPolicySuccess1() { handler.CreateCategorySimplePolicy("Food", ConditionType.AddressEqual, "Grove Street"); handler.AddPolicy(0); Assert.IsTrue(handler.CheckRelevantPolicies("#9 Large", "Cluckin Bell", policies, "Big Smoke", "Grove Street", 2, 14.00)); }