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)
130289 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1) 130028 gjames: SEARCH-120: Moving SearchContext and facets to its own package git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130361 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -43,7 +43,7 @@ import org.alfresco.rest.api.model.UserInfo;
|
||||
import org.alfresco.rest.api.search.impl.ResultMapper;
|
||||
import org.alfresco.rest.api.search.model.SearchQuery;
|
||||
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
|
||||
import org.alfresco.rest.framework.resource.parameters.SearchContext;
|
||||
import org.alfresco.rest.api.search.context.SearchContext;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
|
@@ -31,8 +31,8 @@ import org.alfresco.rest.api.search.model.Default;
|
||||
import org.alfresco.rest.api.search.model.SearchQuery;
|
||||
import org.alfresco.rest.framework.jacksonextensions.ExecutionResult;
|
||||
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
|
||||
import org.alfresco.rest.framework.resource.parameters.SearchContext;
|
||||
import org.alfresco.rest.framework.resource.parameters.SearchContext.FacetQueryResult;
|
||||
import org.alfresco.rest.api.search.context.SearchContext;
|
||||
import org.alfresco.rest.api.search.context.FacetQueryContext;
|
||||
import org.alfresco.rest.framework.tests.api.mocks.Farmer;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
@@ -92,7 +92,7 @@ public class SearchQuerySerializerTests
|
||||
public void testSerializeContext() throws IOException
|
||||
{
|
||||
ExecutionResult exec1 = new ExecutionResult(new Farmer("180"),null);
|
||||
SearchContext searchContext = new SearchContext(23l, Arrays.asList(new FacetQueryResult("f1", 15), new FacetQueryResult("f2", 20)));
|
||||
SearchContext searchContext = new SearchContext(23l, Arrays.asList(new FacetQueryContext("f1", 15), new FacetQueryContext("f2", 20)));
|
||||
CollectionWithPagingInfo<ExecutionResult> coll = CollectionWithPagingInfo.asPaged(null, Arrays.asList(exec1), false, 2, null, searchContext);
|
||||
String out = helper.writeResponse(coll);
|
||||
assertTrue("There must 'context' json output", out.contains("\"context\":{\"consistency\":{\"lastTxId\":23}"));
|
||||
|
Reference in New Issue
Block a user