public int countPeople() { NodeRef peopleContainer = getPeopleContainer(); return nodeService.countChildAssocs(peopleContainer, true); }
public int countPeople() { NodeRef peopleContainer = getPeopleContainer(); return nodeService.countChildAssocs(peopleContainer, true); }
/** * This method returns the number of items from trashcan * * @return int */ private int getNumberOfItemsInTrashcan() { NodeRef archiveRootNodeRef = nodeService.getRootNode(StoreRef.STORE_REF_ARCHIVE_SPACESSTORE); return nodeService.countChildAssocs(archiveRootNodeRef, true); }
/** * 100 files; 10 per txn */ @Test public void testLoad_02() throws Exception { try { AuthenticationUtil.pushAuthentication(); AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser(); int created = fileFolderLoader.createFiles( writeFolderPath, 100, 10, 1024L, 1024L, Long.MAX_VALUE, false, 10, 256L); assertEquals("Incorrect number of files generated.", 100, created); // Count assertEquals(100, nodeService.countChildAssocs(writeFolderNodeRef, true)); } finally { AuthenticationUtil.popAuthentication(); } }
/** * Zero files */ @Test public void testLoad_ZeroFiles() throws Exception { try { AuthenticationUtil.pushAuthentication(); AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser(); int created = fileFolderLoader.createFiles( writeFolderPath, 0, 256, 1024L, 1024L, Long.MAX_VALUE, false, 10, 256L); assertEquals("Incorrect number of files generated.", 0, created); // Count assertEquals(0, nodeService.countChildAssocs(writeFolderNodeRef, true)); } finally { AuthenticationUtil.popAuthentication(); } }
assertEquals("Incorrect number of files generated.", 10, created); assertEquals(10, nodeService.countChildAssocs(writeFolderNodeRef, true));
assertEquals("Incorrect number of files generated.", 15, created); assertEquals(15, nodeService.countChildAssocs(writeFolderNodeRef, true));