Class UserPermissionAdminResourceTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.atlassian.crowd.acceptance.tests.rest.service.RestCrowdServiceAcceptanceTestCase
com.atlassian.crowd.acceptance.tests.rest.service.UserPermissionAdminResourceTest
- All Implemented Interfaces:
junit.framework.Test
This is primarily testing 2 things:
1. That the spring configuration is correctly intercepting methods with a permission check
2. That the data is being correctly marshalled to and from json
For a sanity check, it is also checking that you cant revoke your own rights.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
protected static final String
static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final Long
protected static final String
protected static final Long
protected static final String
protected static final String
static final String
static final String
Fields inherited from class com.atlassian.crowd.acceptance.tests.rest.service.RestCrowdServiceAcceptanceTestCase
ADMIN_PASSWORD, ADMIN_USERNAME, APPLICATION_NAME, APPLICATION_PASSWORD, ATTRIBUTES_RESOURCE, AUTHENTICATION_RESOURCE, EEEEP_PASSWORD, EEEEP_USERNAME, EVENTS_RESOURCE, GROUP_BADGERS, GROUP_BADGERS_DESCRIPTION, GROUP_CROWD_ADMINS, GROUP_CROWD_TESTERS, GROUP_CROWD_USERS, GROUPS_RESOURCE, MT, NON_ADMIN_USER_NAME, NON_ADMIN_USER_PASSWORD, NON_CROWD_USER_PASSWORD, NON_CROWD_USER_USERNAME, NON_EXISTENT_GROUP, NON_EXISTENT_USER, PENNY_USERNAME, REST_SERVICE_NAME, restServer, SECOND_ADMIN_PASSWORD, SECOND_ADMIN_USERNAME, SESSION_RESOURCE, USERS_RESOURCE, WEBHOOKS_RESOURCE
-
Constructor Summary
ConstructorDescriptionConstructs a test case with the given name.UserPermissionAdminResourceTest
(String name, RestServer restServer) Constructs a test case with the given name, using the given RestServer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
void
void
void
void
void
Methods inherited from class com.atlassian.crowd.acceptance.tests.rest.service.RestCrowdServiceAcceptanceTestCase
authenticateUser, authenticateUser, deactivateUser, getBaseUriBuilder, getBaseUriBuilder, getBaseUriBuilder, getRootWebTarget, getServerUriBuilder, getWebTarget, getWebTarget, requestEvents, requestEventToken, setRestServer, setUp, tearDown
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 Details
-
ANIMALS
- See Also:
-
BADGERS
- See Also:
-
BIRDS
- See Also:
-
CATS
- See Also:
-
CROWD_ADMINS
- See Also:
-
CROWD_TESTERS
- See Also:
-
CROWD_USERS
- See Also:
-
DOGS
- See Also:
-
DIRECTORY1_ID
-
DIRECTORY2_ID
-
DIRECTORY1_NAME
- See Also:
-
DIRECTORY2_NAME
- See Also:
-
ANON_PERMISSION_DENIED
- See Also:
-
USER_PERMISSION_DENIED
- See Also:
-
ADMIN_USER
- See Also:
-
ADMIN_PW
- See Also:
-
USERNAME_PARAM
- See Also:
-
-
Constructor Details
-
UserPermissionAdminResourceTest
Constructs a test case with the given name.- Parameters:
name
- the test name
-
UserPermissionAdminResourceTest
Constructs a test case with the given name, using the given RestServer.- Parameters:
name
- the test namerestServer
- the RestServer
-
-
Method Details
-
testAnonCanNotListPermissions
- Throws:
Exception
-
testAnonCanNotGrantPermissions
- Throws:
Exception
-
testAnonCanNotRevokePermissions
- Throws:
Exception
-
testAnonCanNotListGroups
- Throws:
Exception
-
testCannotRevokeOwnRights
- Throws:
Exception
-
testListPermissions
- Throws:
Exception
-
testListGroups
- Throws:
Exception
-
testListGroupsWithParams
- Throws:
Exception
-
testRevokePermissions
- Throws:
Exception
-
testGrantPermissions
- Throws:
Exception
-