public void Should_add_ignorepolicy()
        {
            // Act
            PolicyAppender.UpdatePolicies(_ignorePolicy, Policies);

            // Assert
            Assert.That(Policies.Contains(_ignorePolicy), Is.True);
        }
        public void Should_add_RequireAllRolesPolicy()
        {
            // Act
            PolicyAppender.UpdatePolicies(_requireAllRolesPolicy, Policies);

            // Assert
            Assert.That(Policies.Contains(_requireAllRolesPolicy), Is.True);
        }
        public void Should_add_DenyAuthenticatedAccessPolicy()
        {
            // Act
            PolicyAppender.UpdatePolicies(_denyAuthenticatedAccessPolicy, Policies);

            // Assert
            Assert.That(Policies.Contains(_denyAuthenticatedAccessPolicy), Is.True);
        }
 public void AddPolicy(string policy)
 {
     _namedPolicies[policy] = policy;
     if (!Policies.Contains(policy))
     {
         Policies.Add(policy);
     }
 }
        public void Should_remove_all_existing_policies()
        {
            // Act
            PolicyAppender.UpdatePolicies(_denyAnonymousAccessPolicy, Policies);

            // Assert
            Assert.That(Policies.Contains(_denyAuthenticatedAccessPolicy), Is.False);
            Assert.That(Policies.Count, Is.EqualTo(1));
        }
 public void AddPolicies(List <string> policies)
 {
     foreach (string policy in policies)
     {
         _namedPolicies[policy] = policy;
         if (!Policies.Contains(policy))
         {
             Policies.Add(policy);
         }
     }
 }