From 120c731a3b3e055cd6786deef2bf3a1ca0fceb8c Mon Sep 17 00:00:00 2001 From: "Teravus Ovares (Dan Olivares)" Date: Fri, 30 Oct 2009 17:04:10 -0400 Subject: [PATCH] * Moving A test from the OpenSim.Framework.ACL object to the OpenSim.Framework.Tests assembly. Fixing the test. --- OpenSim/Framework/Tests/ACLTest.cs | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 OpenSim/Framework/Tests/ACLTest.cs diff --git a/OpenSim/Framework/Tests/ACLTest.cs b/OpenSim/Framework/Tests/ACLTest.cs new file mode 100644 index 0000000000..2428b64e3b --- /dev/null +++ b/OpenSim/Framework/Tests/ACLTest.cs @@ -0,0 +1,41 @@ +using System; +using NUnit.Framework; + + +namespace OpenSim.Framework.Tests +{ + [TestFixture] + public class ACLTest + { + #region Tests + + /// + /// ACL Test class + /// + [Test] + public void ACLTest01() + { + ACL acl = new ACL(); + + Role Guests = new Role("Guests"); + acl.AddRole(Guests); + + Role[] parents = new Role[1]; + parents[0] = Guests; + + Role JoeGuest = new Role("JoeGuest", parents); + acl.AddRole(JoeGuest); + + Resource CanBuild = new Resource("CanBuild"); + acl.AddResource(CanBuild); + + + acl.GrantPermission("Guests", "CanBuild"); + + acl.HasPermission("JoeGuest", "CanBuild"); + + } + + #endregion + } +}