Class DefaultPaginatedGenericDaoIntegrationTest

    • Field Detail

      • nameComparator

        protected java.util.Comparator<UserGroupModel> nameComparator
      • uidComparator

        protected java.util.Comparator<UserGroupModel> uidComparator
    • Constructor Detail

      • DefaultPaginatedGenericDaoIntegrationTest

        public DefaultPaginatedGenericDaoIntegrationTest()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldSearchByPagination

        public void shouldSearchByPagination()
      • shouldSearchAndSortByName

        public void shouldSearchAndSortByName()
      • shouldSearchAndSortByNameWithUpperCaseName

        public void shouldSearchAndSortByNameWithUpperCaseName()
      • shouldSearchAndSortByUid

        public void shouldSearchAndSortByUid()
      • shouldSearchAndSortByUidWithUpperCaseUid

        public void shouldSearchAndSortByUidWithUpperCaseUid()
      • shouldSearchByPaginationWithParam

        public void shouldSearchByPaginationWithParam()
      • shouldSearchByPaginationAndSortByNameWithParam

        public void shouldSearchByPaginationAndSortByNameWithParam()
      • createUserGroupModels

        protected UserGroupModel[] createUserGroupModels​(int size)
        Returns an UserGroupModel array of given size with each of UserGroupModel's name of "test_usergroup" + sequence.
        Parameters:
        size - the size of array
        Returns:
        Array of UserGroupModel
      • assertPaginationResults

        protected void assertPaginationResults​(int expectedPaginatedResultSize,
                                               int expectedTotalResultSize,
                                               SearchPageData<UserGroupModel> searchResult)
        Asserts the given searchPageData results to see if it has the expected result count based on requested pagination pageSize. Then also checks for the total results count.
        Parameters:
        expectedPaginatedResultSize - the expected result count
        expectedTotalResultSize - the expected total results of the search results
        searchResult - the searchResult