public void DifferentPermissionReturnsInherited() { RolePermission assertion = new RolePermission("testrole", SecurityRight.Inherit, SecurityRight.Inherit, SecurityRight.Allow, SecurityRight.Inherit, new UserName("johndoe")); SecurityRight result = assertion.CheckPermission(null, SecurityPermission.SendMessage); Assert.AreEqual(SecurityRight.Inherit, result); }
public void MatchingPermissionReturnsRight() { RolePermission assertion = new RolePermission("testrole", SecurityRight.Inherit, SecurityRight.Inherit, SecurityRight.Allow, SecurityRight.Inherit, new UserName("johndoe")); SecurityRight result = assertion.CheckPermission(null, SecurityPermission.ForceAbortBuild); Assert.AreEqual(SecurityRight.Allow, result); }