aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Tests/ACLTest.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/OpenSim/Framework/Tests/ACLTest.cs b/OpenSim/Framework/Tests/ACLTest.cs
new file mode 100644
index 0000000..2428b64
--- /dev/null
+++ b/OpenSim/Framework/Tests/ACLTest.cs
@@ -0,0 +1,41 @@
1using System;
2using NUnit.Framework;
3
4
5namespace OpenSim.Framework.Tests
6{
7 [TestFixture]
8 public class ACLTest
9 {
10 #region Tests
11
12 /// <summary>
13 /// ACL Test class
14 /// </summary>
15 [Test]
16 public void ACLTest01()
17 {
18 ACL acl = new ACL();
19
20 Role Guests = new Role("Guests");
21 acl.AddRole(Guests);
22
23 Role[] parents = new Role[1];
24 parents[0] = Guests;
25
26 Role JoeGuest = new Role("JoeGuest", parents);
27 acl.AddRole(JoeGuest);
28
29 Resource CanBuild = new Resource("CanBuild");
30 acl.AddResource(CanBuild);
31
32
33 acl.GrantPermission("Guests", "CanBuild");
34
35 acl.HasPermission("JoeGuest", "CanBuild");
36
37 }
38
39 #endregion
40 }
41}