public void TestCreateAndOperatorPolicy() { InitPolicies(); string[] policyData = handler.CreateCategoryPolicy("Food", OperatorType.AND, 0, 1); string[] expectedData = { "2", "AND", "0", "1" }; CompareArrays(expectedData, policyData); Assert.AreEqual(3, handler.GetSessionPolicies().Length); }
private void InitComplexPolicy(OperatorType type) { handler.CreateCategorySimplePolicy("Food", ConditionType.QuantityGreater, "2"); handler.CreateCategorySimplePolicy("Food", ConditionType.UsernameEqual, "Big Smoke"); handler.CreateCategoryPolicy("Food", type, 0, 1); handler.AddPolicy(2); }