예제 #1
0
 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);
 }