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

130171 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1)
      129779 gjames: SEARCH-118: Adding search.score to node response


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130322 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-09-06 22:03:18 +00:00
parent 043a158c80
commit e118a4940e
4 changed files with 45 additions and 5 deletions

View File

@@ -121,10 +121,12 @@ public class ResultMapperTests
public void testToCollectionWithPagingInfo() throws Exception
{
ResultSet results = mockResultset();
CollectionWithPagingInfo<Node> collection = mapper.toCollectionWithPagingInfo(mockParams(),results);
assertNotNull(collection);
CollectionWithPagingInfo<Node> collectionWithPage = mapper.toCollectionWithPagingInfo(mockParams(),results);
assertNotNull(collectionWithPage);
Long found = results.getNumberFound();
assertEquals(found.intValue(), collection.getTotalItems().intValue());
assertEquals(found.intValue(), collectionWithPage.getTotalItems().intValue());
Node firstNode = collectionWithPage.getCollection().stream().findFirst().get();
assertNotNull(firstNode.getSearch().getScore());
}
private ResultSet mockResultset() throws JSONException