* Moving A test from the OpenSim.Framework.ACL object to the OpenSim.Framework.Tests assembly. Fixing the test.

0.6.8-post-fixes
Teravus Ovares (Dan Olivares) 2009-10-30 17:04:10 -04:00
parent f5e470d4ba
commit 120c731a3b
1 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,41 @@
using System;
using NUnit.Framework;
namespace OpenSim.Framework.Tests
{
[TestFixture]
public class ACLTest
{
#region Tests
/// <summary>
/// ACL Test class
/// </summary>
[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
}
}