Ejemplo n.º 1
0
        public void Protection()
        {
            TestSecurity security = new TestSecurity();

            security.SetAccessRuleProtection(true, true);
            Assert.IsTrue(security.AreAccessRulesProtected);
            Assert.IsFalse(security.AreAuditRulesProtected);

            security.SetAuditRuleProtection(true, false);
            Assert.IsTrue(security.AreAccessRulesProtected);
            Assert.IsTrue(security.AreAuditRulesProtected);

            security.SetAccessRuleProtection(false, false);
            Assert.IsFalse(security.AreAccessRulesProtected);
            Assert.IsTrue(security.AreAuditRulesProtected);

            security.SetAuditRuleProtection(false, true);
            Assert.IsFalse(security.AreAccessRulesProtected);
            Assert.IsFalse(security.AreAuditRulesProtected);
        }
Ejemplo n.º 2
0
		public void Protection ()
		{
			TestSecurity security = new TestSecurity ();

			security.SetAccessRuleProtection (true, true);
			Assert.IsTrue (security.AreAccessRulesProtected);
			Assert.IsFalse (security.AreAuditRulesProtected);

			security.SetAuditRuleProtection (true, false);
			Assert.IsTrue (security.AreAccessRulesProtected);
			Assert.IsTrue (security.AreAuditRulesProtected);

			security.SetAccessRuleProtection (false, false);
			Assert.IsFalse (security.AreAccessRulesProtected);
			Assert.IsTrue (security.AreAuditRulesProtected);

			security.SetAuditRuleProtection (false, true);
			Assert.IsFalse (security.AreAccessRulesProtected);
			Assert.IsFalse (security.AreAuditRulesProtected);
		}