MutexAccessRuleTest.cs 659 B

12345678910111213141516171819202122232425
  1. // MutexAccessRuleTest - NUnit Test Cases for MutexAccessRule
  2. //
  3. // Authors:
  4. // James Bellinger ([email protected])
  5. using System;
  6. using System.Security.AccessControl;
  7. using System.Security.Principal;
  8. using NUnit.Framework;
  9. namespace MonoTests.System.Security.AccessControl
  10. {
  11. [TestFixture]
  12. public class MutexAccessRuleTest
  13. {
  14. [Test]
  15. public void ConstructsWithoutCrashingAndRemembersRights ()
  16. {
  17. SecurityIdentifier id = new SecurityIdentifier (WellKnownSidType.WorldSid, null);
  18. MutexAccessRule rule = new MutexAccessRule (id, MutexRights.FullControl, AccessControlType.Allow);
  19. Assert.AreEqual (rule.MutexRights, MutexRights.FullControl);
  20. }
  21. }
  22. }