public void TestGetChannels() { PolicyLoader policyLoader = new PolicyLoader(); policyLoader.LoadRuntimePolicy("Pro5.test"); foreach (IPolicy policy in policyLoader.Policies) { List<IPolicyChannel> channels = policyLoader.GetChannels(policy); Assert.IsTrue(channels.Count == 2); } }
public void TestIsLDAPRouting() { PolicyLoader policyLoader = new PolicyLoader(); policyLoader.LoadRuntimePolicy("Pro5.test"); foreach (IPolicy policy in policyLoader.Policies) { List<IPolicyChannel> channels = policyLoader.GetChannels(policy); foreach (IPolicyChannel policyChannel in channels) { Assert.IsFalse(policyLoader.IsLDAPRouting(policyChannel), "There should be no LDAP routing in Pro5.test policies"); } } }
public void TestCountActions() { PolicyLoader policyLoader = new PolicyLoader(); policyLoader.LoadRuntimePolicy("Pro5.test"); int ex = 0; int In = 0; foreach (IPolicy policy in policyLoader.Policies) { List<IPolicyChannel> channels = policyLoader.GetChannels(policy); foreach (IPolicyChannel policyChannel in channels) { ex += policyLoader.GetCountExternalActions(policyChannel); In += policyLoader.GetCountInternalActions(policyChannel); } } Assert.AreEqual(20, ex); Assert.AreEqual(0, In); }