Package org.apache.archiva.redback.tests
Class AbstractRbacManagerTestCase
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.archiva.redback.tests.AbstractRbacManagerTestCase
-
- All Implemented Interfaces:
junit.framework.Test
@ContextConfiguration(locations={"classpath*:/META-INF/spring-context.xml","classpath*:/spring-context.xml"}) public abstract class AbstractRbacManagerTestCase extends junit.framework.TestCase
AbstractRbacManagerTestCase- Author:
- Joakim Erdfelt
-
-
Field Summary
Fields Modifier and Type Field Description protected RbacManagerEventTracker
eventTracker
protected Logger
log
-
Constructor Summary
Constructors Constructor Description AbstractRbacManagerTestCase()
-
Method Summary
-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
-
-
-
-
Field Detail
-
eventTracker
protected RbacManagerEventTracker eventTracker
-
-
Constructor Detail
-
AbstractRbacManagerTestCase
public AbstractRbacManagerTestCase()
-
-
Method Detail
-
setRbacManager
public void setRbacManager(RBACManager store)
-
getRbacManager
public RBACManager getRbacManager()
-
setUp
public void setUp() throws Exception
- Overrides:
setUp
in classjunit.framework.TestCase
- Throws:
Exception
-
tearDown
public void tearDown() throws Exception
- Overrides:
tearDown
in classjunit.framework.TestCase
- Throws:
Exception
-
assertEventCount
public abstract void assertEventCount()
-
testStoreInitialization
public void testStoreInitialization() throws Exception
- Throws:
Exception
-
testResources
public void testResources() throws Exception
- Throws:
Exception
-
testAddGetPermission
public void testAddGetPermission() throws RbacManagerException
- Throws:
RbacManagerException
-
testAddGetRole
public void testAddGetRole() throws RbacManagerException
- Throws:
RbacManagerException
-
testAllowRoleWithoutPermissions
public void testAllowRoleWithoutPermissions() throws RbacManagerException
- Throws:
RbacManagerException
-
supportChildRole
protected boolean supportChildRole()
ldap doesn't support child roles- Returns:
-
testAddGetChildRole
public void testAddGetChildRole() throws RbacManagerException
- Throws:
RbacManagerException
-
testAddGetChildRoleViaName
public void testAddGetChildRoleViaName() throws RbacManagerException
- Throws:
RbacManagerException
-
testUserAssignmentAddRole
public void testUserAssignmentAddRole() throws RbacManagerException
- Throws:
RbacManagerException
-
testUserAssignmentWithChildRoles
public void testUserAssignmentWithChildRoles() throws RbacManagerException
- Throws:
RbacManagerException
-
testGetAssignedPermissionsNoChildRoles
public void testGetAssignedPermissionsNoChildRoles() throws RbacManagerException
- Throws:
RbacManagerException
-
testGlobalResource
public void testGlobalResource() throws RbacManagerException
- Throws:
RbacManagerException
-
testGlobalResourceOneLiner
public void testGlobalResourceOneLiner() throws RbacManagerException
- Throws:
RbacManagerException
-
testUserAssignmentAddRemoveSecondRole
public void testUserAssignmentAddRemoveSecondRole() throws RbacManagerException
- Throws:
RbacManagerException
-
testUserAssignmentMultipleRoles
public void testUserAssignmentMultipleRoles() throws RbacManagerException
- Throws:
RbacManagerException
-
testUserAssignmentMultipleRolesWithChildRoles
public void testUserAssignmentMultipleRolesWithChildRoles() throws RbacManagerException
- Throws:
RbacManagerException
-
testGetAssignedRoles
public void testGetAssignedRoles() throws RbacManagerException
- Throws:
RbacManagerException
-
incAssignements
protected int incAssignements(int size)
getAllUserAssignments() can return more for ldap as when creating a group it's mandatory to have at leat 1 user in the group- Parameters:
size
-- Returns:
-
testGetAssignedPermissions
public void testGetAssignedPermissions() throws RbacManagerException
- Throws:
RbacManagerException
-
getChildRole
public Role getChildRole(RBACManager manager, Role role, String expectedChildRoleName, int childRoleCount) throws RbacManagerException
- Throws:
RbacManagerException
-
testAddRemovePermanentRole
public void testAddRemovePermanentRole() throws RbacManagerException
- Throws:
RbacManagerException
-
testGetRolesDeep
public void testGetRolesDeep() throws RbacManagerException
- Throws:
RbacManagerException
-
testGetAssignedPermissionsDeep
public void testGetAssignedPermissionsDeep() throws RbacManagerException
- Throws:
RbacManagerException
-
testLargeApplicationInit
public void testLargeApplicationInit() throws RbacManagerException
- Throws:
RbacManagerException
-
testAddRemovePermanentPermission
public void testAddRemovePermanentPermission() throws RbacManagerException
- Throws:
RbacManagerException
-
testAddRemovePermanentOperation
public void testAddRemovePermanentOperation() throws RbacManagerException
- Throws:
RbacManagerException
-
testInitialize
public void testInitialize() throws Exception
- Throws:
Exception
-
afterSetup
protected void afterSetup()
Allows subclasses to hook code after a test case has finished it's setup
-
-