diff options
author | Melanie | 2009-10-30 19:55:51 +0000 |
---|---|---|
committer | Melanie | 2009-10-30 19:55:51 +0000 |
commit | 8eb3ea02eee97685c84eba63e7613a24eac7eb6c (patch) | |
tree | a15830fee20129967ee1a753d0376edba6dc8ba2 /OpenSim/Framework | |
parent | Convert the AvatarGroupsReply message to the event queue. (diff) | |
parent | Merge branch 'master' of ssh://MyConnection/var/git/opensim (diff) | |
download | opensim-SC-8eb3ea02eee97685c84eba63e7613a24eac7eb6c.zip opensim-SC-8eb3ea02eee97685c84eba63e7613a24eac7eb6c.tar.gz opensim-SC-8eb3ea02eee97685c84eba63e7613a24eac7eb6c.tar.bz2 opensim-SC-8eb3ea02eee97685c84eba63e7613a24eac7eb6c.tar.xz |
Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Tests/ACLTest.cs | 41 |
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 @@ | |||
1 | using System; | ||
2 | using NUnit.Framework; | ||
3 | |||
4 | |||
5 | namespace 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 | } | ||