Transformer transformer1 = new SearchResultToAttrValueList( "uniqueMember", "uid" ); //$NON-NLS-1$ //$NON-NLS-2$
GenericLdapSearch allUsernamesSearch = new GenericLdapSearch( getContextSource(), paramFactory, transformer1 );
allUsernamesSearch.afterPropertiesSet();
DefaultLdapUserRoleListService userRoleListService = new DefaultLdapUserRoleListService();
userRoleListService.setAllUsernamesSearch( allUsernamesSearch );
List res = userRoleListService.getAllUsers( defaultTenant );
assertTrue( res.contains( "pat" ) ); //$NON-NLS-1$
assertTrue( res.contains( "admin" ) ); //$NON-NLS-1$
if ( logger.isDebugEnabled() ) {
logger.debug( "results of getAllUserNames1(): " + res ); //$NON-NLS-1$
}
try {
userRoleListService.getAllUsers( new Tenant( "/pentaho", true ) );
} catch ( UnsupportedOperationException uoe ) {
assertNotNull( uoe );
}
}