createLevel1Folders();
log.info("test getting all objects with getChildren");
BigInteger maxItems = BigInteger.valueOf(NUM_ROOT_FOLDERS * 2);
BigInteger skipCount = BigInteger.valueOf(0);
ObjectInFolderList result = fNavSvc.getChildren(fRepositoryId, fRootFolderId, "*", null, false,
IncludeRelationships.NONE, null, true, maxItems, skipCount, null);
List<ObjectInFolderData> folders = result.getObjects();
log.info(" found " + folders.size() + " folders in getChildren()");
for (ObjectInFolderData folder : folders) {
log.info(" found folder id " + folder.getObject().getId() + " path segment " + folder.getPathSegment());
}
assertEquals(NUM_ROOT_FOLDERS, folders.size());
log.info("test paging with getChildren");
maxItems = BigInteger.valueOf(3);
skipCount = BigInteger.valueOf(3);
result = fNavSvc.getChildren(fRepositoryId, fRootFolderId, "*", null, false, IncludeRelationships.NONE, null,
true, maxItems, skipCount, null);
folders = result.getObjects();
log.info(" found " + folders.size() + " folders in getChildren()");
for (ObjectInFolderData folder : folders) {
log.info(" found folder id " + folder.getObject().getId() + " path segment " + folder.getPathSegment());
}
assertEquals(3, folders.size());
assertEquals("Folder 3", folders.get(0).getPathSegment());
assertTrue(result.getNumItems().longValue() > 0);
log.info("... testGetChildren() finished.");
}