login( USERNAME_ADMIN, tenantAcme, new String[] { tenantAdminRoleName, tenantAuthenticatedRoleName } );
userRoleDao.createUser( tenantAcme, USERNAME_SUZY, PASSWORD, "", null );
login( USERNAME_SUZY, tenantAcme, new String[] { tenantAuthenticatedRoleName } );
RepositoryFileTree root =
repo.getTree( new RepositoryRequest( ClientRepositoryPaths.getRootFolderPath(), true, 0, null ) );
assertNotNull( root.getFile() );
assertNull( root.getChildren() );
root = repo.getTree( new RepositoryRequest( ClientRepositoryPaths.getRootFolderPath(), true, 1, null ) );
assertNotNull( root.getFile() );
assertNotNull( root.getChildren() );
assertFalse( root.getChildren().isEmpty() );
assertNull( root.getChildren().get( 0 ).getChildren() );
root = repo.getTree( new RepositoryRequest( ClientRepositoryPaths.getHomeFolderPath(), true, -1, null ) );
assertNotNull( root.getFile() );
assertNotNull( root.getChildren() );
assertFalse( root.getChildren().isEmpty() );
assertTrue( root.getChildren().get( 0 ).getChildren().isEmpty() );
root = repo.getTree( new RepositoryRequest( ClientRepositoryPaths.getHomeFolderPath(), true, -1, "*uz*" ) );
assertEquals( 1, root.getChildren().size() );
}