Exemple #1
0
        public void Allowed()
        {
            var policy = new WhiteList <string>();

            policy.Add("a");
            policy.Add("b");
            Assert.IsTrue(policy.IsAllowed("a"));
            Assert.IsTrue(policy.IsAllowed("b"));
            Assert.IsFalse(policy.IsAllowed("c"));
            Assert.IsFalse(policy.IsAllowed("d"));
        }
Exemple #2
0
        public void Empty()
        {
            var policy = new WhiteList <string>();

            Assert.IsTrue(policy.IsAllowed("a"));
        }