MutexAccessRuleTest.cs 679 B

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