mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.N (5.2.1) to HEAD (5.2)
130294 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1) 130038 gjames: SEARCH-158: Limit results by a final size of 100 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130366 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -44,6 +44,7 @@ import org.alfresco.rest.api.search.model.Template;
|
||||
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
|
||||
import org.alfresco.rest.framework.resource.parameters.Paging;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.LimitBy;
|
||||
import org.alfresco.service.cmr.search.SearchParameters;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -75,6 +76,8 @@ public class SearchMapperTests
|
||||
//Test defaults
|
||||
assertEquals("There should be only 1 default store", 1,searchParameters.getStores().size());
|
||||
assertEquals("workspaces store is the default", StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, searchParameters.getStores().get(0));
|
||||
assertEquals(LimitBy.FINAL_SIZE, searchParameters.getLimitBy());
|
||||
assertEquals(100, searchParameters.getMaxItems());
|
||||
|
||||
searchParameters = searchMapper.toSearchParameters(helper.searchQueryFromJson());
|
||||
assertNotNull(searchParameters);
|
||||
@@ -141,6 +144,7 @@ public class SearchMapperTests
|
||||
SearchParameters searchParameters = new SearchParameters();
|
||||
//Doesn't error
|
||||
searchMapper.fromPaging(searchParameters, null);
|
||||
|
||||
Paging paging = Paging.DEFAULT;
|
||||
searchMapper.fromPaging(searchParameters, paging);
|
||||
assertEquals(searchParameters.getMaxItems(),paging.getMaxItems());
|
||||
|
Reference in New Issue
Block a user