public class GroupsResourceTest extends RestCrowdServiceAcceptanceTestCase
ADMIN_PASSWORD, ADMIN_USERNAME, 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 and Description |
---|
GroupsResourceTest(String name)
Constructs a test case with the given name.
|
GroupsResourceTest(String name,
RestServer restServer)
Constructs a test case with the given name, using the given RestServer.
|
Modifier and Type | Method and Description |
---|---|
protected Map<String,Set<String>> |
getExpectedChildGroupToUsersMappingForMembershipTest() |
protected Map<String,Set<String>> |
getExpectedGroupToUsersMappingForMembershipTest() |
void |
testAddDirectChildGroup_NoChild()
Tests adding a direct child group membership with non-existing child group.
|
void |
testAddDirectChildGroup_NoGroup()
Tests adding a direct child group membership with non-existing group.
|
void |
testAddDirectChildGroup_NoNestedGroups()
Tests adding a direct child group membership with nested groups disabled.
|
void |
testAddDirectChildGroup()
Tests adding a direct child group membership.
|
void |
testAddDirectParentGroup_NoGroup()
Tests adding a direct parent group membership with non-existing group.
|
void |
testAddDirectParentGroup_NoParent()
Tests adding a direct parent group membership with non-existing parent group.
|
void |
testAddDirectParentGroup()
Tests adding a direct parent group membership.
|
void |
testAddDirectUser_NoGroup() |
void |
testAddDirectUser_NoUser() |
void |
testAddDirectUser() |
void |
testAddGroup_Unicode() |
void |
testAddGroup() |
void |
testDeleteDirectChildGroup_NoChild()
Tests deleting a child group membership when the child does not exist.
|
void |
testDeleteDirectChildGroup_NoParent()
Tests deleting a child group membership when the parent does not exist.
|
void |
testDeleteDirectChildGroup()
Tests deleting a child group membership.
|
void |
testDeleteDirectUser() |
void |
testDeleteGroup() |
void |
testDeleteGroupAttribute() |
void |
testGetDirectChildGroups_Expanded()
Tests get group members of a group.
|
void |
testGetDirectChildGroups_Group()
Tests retrieving the group that is a direct child of the specified group.
|
void |
testGetDirectChildGroups()
Tests get group members of a group.
|
void |
testGetDirectParentGroups_Expanded()
Tests get user group memberships.
|
void |
testGetDirectParentGroups()
Tests get user group memberships.
|
void |
testGetDirectUsers_Expanded()
Tests retrieving the users that are direct members of the specified group.
|
void |
testGetDirectUsers_Limit1()
Tests get user members of a group.
|
void |
testGetDirectUsers_Limit2()
Tests get user members of a group.
|
void |
testGetDirectUsers_User()
Tests get user members of a group.
|
void |
testGetDirectUsers()
Tests get usernames of a group.
|
void |
testGetDirectUsersReturns404WhenGroupDoesNotExist() |
void |
testGetDirectUsersReturns404WhenUserAndGroupDoNotExist() |
void |
testGetDirectUsersReturns404WhenUserDoesNotExist() |
void |
testGetGroup_DoesNotExist() |
void |
testGetGroup_Expanded() |
void |
testGetGroup() |
void |
testGetGroupWithNoGroupSpecifiedReturnsA404() |
void |
testGetMembershipsDoesNotReturnJson()
This resource is optimised for XML (it streams its response), but does not currently support JSON.
|
void |
testGetMembershipsReturnsExactlyExpectedMemberships() |
void |
testGetNestedChildGroups_Expanded()
Tests get group members of a group.
|
void |
testGetNestedChildGroups()
Tests get group members of a group.
|
void |
testGetNestedParentGroups_Expanded()
Tests get user group memberships.
|
void |
testGetNestedParentGroups_Group() |
void |
testGetNestedParentGroups_NoGroup() |
void |
testGetNestedParentGroups()
Tests get user group memberships.
|
void |
testGetNestedUsers_EmptyUsernameFails() |
void |
testGetNestedUsers_Expanded()
Tests get user members of a group.
|
void |
testGetNestedUsers_NoUser() |
void |
testGetNestedUsers_User() |
void |
testGetNestedUsers_UserReturns404WhenUserAndGroupDoNotExist() |
void |
testGetNestedUsers_UserReturns404WhenUserDoesNotExist() |
void |
testGetNestedUsers()
Tests get user members of a group.
|
void |
testGetNestedUsersReturns404WhenGroupDoNotExist() |
void |
testMembershipsAcceptsConditionalRequest() |
void |
testMembershipsResponseIncludesEntityTag() |
void |
testStoreGroupAttributes() |
void |
testUpdateGroup_BadDetails() |
void |
testUpdateGroup() |
authenticateUser, authenticateUser, deactivateUser, getBaseUriBuilder, getBaseUriBuilder, getBaseUriBuilder, getRootWebResource, getServerUriBuilder, getWebResource, getWebResource, requestEvents, requestEventToken, setRestServer, setUp, tearDown
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
public GroupsResourceTest(String name)
name
- the test namepublic GroupsResourceTest(String name, RestServer restServer)
name
- the test namerestServer
- the RestServerpublic void testGetGroup()
public void testGetGroup_Expanded()
public void testGetGroup_DoesNotExist()
public void testGetGroupWithNoGroupSpecifiedReturnsA404()
public void testAddGroup()
public void testAddGroup_Unicode()
public void testUpdateGroup()
public void testUpdateGroup_BadDetails()
public void testDeleteGroup()
public void testStoreGroupAttributes()
public void testDeleteGroupAttribute()
public void testGetDirectUsers()
public void testGetDirectUsers_Limit1()
public void testGetDirectUsers_Limit2()
public void testGetDirectUsers_Expanded()
public void testGetDirectUsersReturns404WhenGroupDoesNotExist()
public void testGetDirectUsersReturns404WhenUserDoesNotExist()
public void testGetDirectUsersReturns404WhenUserAndGroupDoNotExist()
public void testGetDirectUsers_User()
public void testAddDirectUser()
public void testAddDirectUser_NoUser()
public void testAddDirectUser_NoGroup()
public void testDeleteDirectUser()
public void testGetNestedUsers()
public void testGetNestedUsersReturns404WhenGroupDoNotExist()
public void testGetNestedUsers_UserReturns404WhenUserDoesNotExist()
public void testGetNestedUsers_UserReturns404WhenUserAndGroupDoNotExist()
public void testGetNestedUsers_Expanded()
public void testGetNestedUsers_User()
public void testGetNestedUsers_NoUser()
public void testGetNestedUsers_EmptyUsernameFails()
public void testGetDirectParentGroups()
public void testGetDirectParentGroups_Expanded()
public void testAddDirectParentGroup()
public void testAddDirectParentGroup_NoGroup()
public void testAddDirectParentGroup_NoParent()
public void testGetNestedParentGroups()
public void testGetNestedParentGroups_Expanded()
public void testGetNestedParentGroups_Group()
public void testGetNestedParentGroups_NoGroup()
public void testGetDirectChildGroups()
public void testGetDirectChildGroups_Expanded()
public void testAddDirectChildGroup()
public void testAddDirectChildGroup_NoGroup()
public void testAddDirectChildGroup_NoChild()
public void testAddDirectChildGroup_NoNestedGroups()
public void testGetDirectChildGroups_Group()
public void testDeleteDirectChildGroup()
public void testDeleteDirectChildGroup_NoParent()
public void testDeleteDirectChildGroup_NoChild()
public void testGetNestedChildGroups()
public void testGetNestedChildGroups_Expanded()
public void testGetMembershipsReturnsExactlyExpectedMemberships()
protected Map<String,Set<String>> getExpectedChildGroupToUsersMappingForMembershipTest()
protected Map<String,Set<String>> getExpectedGroupToUsersMappingForMembershipTest()
public void testGetMembershipsDoesNotReturnJson()
public void testMembershipsResponseIncludesEntityTag()
public void testMembershipsAcceptsConditionalRequest()
Copyright © 2019 Atlassian. All rights reserved.