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

public class SearchResourceTest extends RestCrowdServiceAcceptanceTestCase
Note that this test class is reused in JIRA via inheritance. Please be mindful of that when making changes to this class.
  • Constructor Details

    • SearchResourceTest

      public SearchResourceTest(String name)
      Constructs a test case with the given name.
      Parameters:
      name - the test name
    • SearchResourceTest

      public SearchResourceTest(String name, RestServer restServer)
      Constructs a test case with the given name, using the given RestServer.
      Parameters:
      name - the test name
      restServer - the RestServer
  • Method Details

    • testGetUnknownEntityType

      public void testGetUnknownEntityType() throws Exception
      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

      protected Set<String> 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()