diff options
author | Teravus Ovares (Dan Olivares) | 2009-10-30 17:04:10 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-10-30 17:04:10 -0400 |
commit | 120c731a3b3e055cd6786deef2bf3a1ca0fceb8c (patch) | |
tree | 4732355cd3f4dda606c82ac065442a72495c7801 /OpenSim/Framework/Tests | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-120c731a3b3e055cd6786deef2bf3a1ca0fceb8c.zip opensim-SC_OLD-120c731a3b3e055cd6786deef2bf3a1ca0fceb8c.tar.gz opensim-SC_OLD-120c731a3b3e055cd6786deef2bf3a1ca0fceb8c.tar.bz2 opensim-SC_OLD-120c731a3b3e055cd6786deef2bf3a1ca0fceb8c.tar.xz |
* Moving A test from the OpenSim.Framework.ACL object to the OpenSim.Framework.Tests assembly. Fixing the test.
Diffstat (limited to 'OpenSim/Framework/Tests')
-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 | } | ||