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)
130179 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1) 129819 gjames: SEARCH-113: The Json representation is immutable. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130330 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -111,7 +111,7 @@ public class ResultMapperTests
|
||||
@Test
|
||||
public void testNoResults() throws Exception
|
||||
{
|
||||
CollectionWithPagingInfo<Node> collection = mapper.toCollectionWithPagingInfo(mockParams(new SearchQuery()),new EmptyResultSet());
|
||||
CollectionWithPagingInfo<Node> collection = mapper.toCollectionWithPagingInfo(mockParams(SearchQuery.EMPTY),new EmptyResultSet());
|
||||
assertNotNull(collection);
|
||||
assertFalse(collection.hasMoreItems());
|
||||
assertTrue(collection.getTotalItems() < 1);
|
||||
@@ -121,7 +121,7 @@ public class ResultMapperTests
|
||||
public void testToCollectionWithPagingInfo() throws Exception
|
||||
{
|
||||
ResultSet results = mockResultset();
|
||||
CollectionWithPagingInfo<Node> collectionWithPage = mapper.toCollectionWithPagingInfo(mockParams(new SearchQuery()),results);
|
||||
CollectionWithPagingInfo<Node> collectionWithPage = mapper.toCollectionWithPagingInfo(mockParams(SearchQuery.EMPTY),results);
|
||||
assertNotNull(collectionWithPage);
|
||||
Long found = results.getNumberFound();
|
||||
assertEquals(found.intValue(), collectionWithPage.getTotalItems().intValue());
|
||||
|
Reference in New Issue
Block a user