Class SearchResourceTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.atlassian.crowd.acceptance.tests.rest.service.RestCrowdServiceAcceptanceTestCase
com.atlassian.crowd.acceptance.tests.rest.service.SearchResourceTest
- All Implemented Interfaces:
junit.framework.Test
Note that this test class is reused in JIRA via inheritance. Please be mindful of that when making changes to this
class.
-
Field Summary
Fields inherited from class com.atlassian.crowd.acceptance.tests.rest.service.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, USERNAME_PARAM, USERS_RESOURCE, WEBHOOKS_RESOURCE
-
Constructor Summary
ConstructorDescriptionSearchResourceTest
(String name) Constructs a test case with the given name.SearchResourceTest
(String name, RestServer restServer) Constructs a test case with the given name, using the given RestServer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Tests getting all the group namesvoid
Tests getting all group names with active and inactive groups.void
Tests getting a restricted number of group names (specifying a max result parameter).void
Tests getting all group names from an offset value.void
Tests getting all groups.void
void
void
void
Tests that getting an unknown entity type results in a 400 (Bad Request) returned.void
Tests getting all users from an offset value.void
Tests getting all available user names.void
Tests that users with matching aliases are returned in lower case.void
Tests that all users are matched and returned in lower case.void
Tests that user with username 'admin' is not returned, because that user has an alias.void
Tests getting all user names with the specified email.void
Tests getting user names with a max-result parameter.void
Tests getting all user names from a negative offset value.void
Tests getting all user names from an offset value.void
Tests getting all users.void
Tests getting users with user name restriction.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
-
Constructor Details
-
SearchResourceTest
Constructs a test case with the given name.- Parameters:
name
- the test name
-
SearchResourceTest
Constructs a test case with the given name, using the given RestServer.- Parameters:
name
- the test namerestServer
- the RestServer
-
-
Method Details
-
testGetUnknownEntityType
Tests that getting an unknown entity type results in a 400 (Bad Request) returned.- Throws:
Exception
-
testGetUserNames
public void testGetUserNames()Tests getting all available user names. -
testGetUserNames_MaxResult
public void testGetUserNames_MaxResult()Tests getting user names with a max-result parameter. -
testGetUserNames_StartIndex
public void testGetUserNames_StartIndex()Tests getting all user names from an offset value. -
testGetUserNames_Aliases
public void testGetUserNames_Aliases()Tests that users with matching aliases are returned in lower case. -
testGetUserNames_AliasesIgnoreUsernameWhenAliasExists
public void testGetUserNames_AliasesIgnoreUsernameWhenAliasExists()Tests that user with username 'admin' is not returned, because that user has an alias. -
testGetUserNames_AliasesAll
public void testGetUserNames_AliasesAll()Tests that all users are matched and returned in lower case. -
testGetUserNames_NegativeStartIndex
public void testGetUserNames_NegativeStartIndex()Tests getting all user names from a negative offset value. Should return a Bad Request (400) status. -
testGetUserNames_EmailRestriction
public void testGetUserNames_EmailRestriction()Tests getting all user names with the specified email. -
testGetUsers
public void testGetUsers()Tests getting all users. -
testGetUsers_UserRestriction
public void testGetUsers_UserRestriction()Tests getting users with user name restriction. -
testGetUsersRestrictionOnUnusedCustomAttributeReturnsNoUsers
public void testGetUsersRestrictionOnUnusedCustomAttributeReturnsNoUsers() -
testGetUsersRestrictionOnCustomAttributeReturnsUser
public void testGetUsersRestrictionOnCustomAttributeReturnsUser() -
testGetUsersCqlRestrictionOnCustomAttributeReturnsUser
public void testGetUsersCqlRestrictionOnCustomAttributeReturnsUser() -
testGetUsersCqlRestrictionOnCustomAttributeWithNullMatchReturnsUsersWithoutTheCustomAttribute
public void testGetUsersCqlRestrictionOnCustomAttributeWithNullMatchReturnsUsersWithoutTheCustomAttribute() -
testGetUser_StartIndex
public void testGetUser_StartIndex()Tests getting all users from an offset value. -
testGetUserWithExpandAttributesReturnsUsers
public void testGetUserWithExpandAttributesReturnsUsers() -
testGetUsersWithExpandAttributesRetrievesAttributes
public void testGetUsersWithExpandAttributesRetrievesAttributes() -
testGetGroupNames
public void testGetGroupNames()Tests getting all the group names -
getAllGroupnames
-
testGetGroupNames_Restricted
public void testGetGroupNames_Restricted()Tests getting a restricted number of group names (specifying a max result parameter). -
testGetGroupNames_StartIndex
public void testGetGroupNames_StartIndex()Tests getting all group names from an offset value. -
testGetGroupNames_ActiveRestriction
public void testGetGroupNames_ActiveRestriction()Tests getting all group names with active and inactive groups. -
testGetGroupsCqlRestrictionOnCustomAttributeReturnsGroup
public void testGetGroupsCqlRestrictionOnCustomAttributeReturnsGroup() -
testGetGroups
public void testGetGroups()Tests getting all groups. -
testGetGroupsWithExpandAttributesReturnsGroups
public void testGetGroupsWithExpandAttributesReturnsGroups() -
testGetGroupsWithExpandAttributesRetrievesAttributes
public void testGetGroupsWithExpandAttributesRetrievesAttributes()
-