Merged searchapi (5.2.1) to 5.2.N (5.2.1)

130027 gjames: SEARCH-120: Implementing facet queries


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130288 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2016-09-06 15:36:38 +00:00
parent 81bb4937d1
commit 8cdfa5f8de
10 changed files with 228 additions and 38 deletions

View File

@@ -236,21 +236,6 @@ public class SerializeTests extends AbstractContextTest implements RecognizedPar
assertTrue("There must 'source' json output", StringUtils.contains(out, "\"source\":{\"name\":\"Dolly\",\"age\":3,\"sheepGuid\":\"barbie\""));
}
@Test
public void testIncludeContext() throws IOException
{
ExecutionResult exec1 = new ExecutionResult(new Farmer("180"),null);
ExecutionResult exec2 = new ExecutionResult(new Farmer("456"),getFilter("age"));
SearchContext searchContext = new SearchContext(23l);
CollectionWithPagingInfo<ExecutionResult> coll = CollectionWithPagingInfo.asPaged(null, Arrays.asList(exec1, exec2), false, 2, null, searchContext);
Object resultCollection = helper.processAdditionsToTheResponse(mock(WebScriptResponse.class), api, null,ParamsExtender.valueOf(false,null),coll);
assertNotNull(resultCollection);
String out = writeResponse(resultCollection);
assertTrue("There must 'context' json output", StringUtils.contains(out, "\"context\":{\"consistency\":{\"lastTxId\":23}}"));
}
@Test
public void testExpandRecursiveRelations() throws IOException
{