public void testFindUsersActiveDirectory() throws Exception {
  LdapManager mgr=getLdapAD();
  List ret=null;
  AndFilter filter=new AndFilter();
  filter.and(new LikeFilter(mgr.getUsersReturningAttribute(LdapUserAttributeConstants.LDAP_USER_ATTRIBUTE_GIVEN_NAME),"*a*"));
  try {
    LdapSearchManagerVO searchMgrVO=new LdapSearchManagerVO();
    searchMgrVO.setFilter(filter);
    searchMgrVO.setAddUserClasses(true);
    ret=mgr.findUsers(searchMgrVO);
  }
 catch (  Exception e) {
  }
  assertEquals(22,ret.size());
}

public void testFindUsersActiveDirectory ( ) throws Exception { LdapManager mgr = getLdapAD ( ) ; List ret = null ; AndFilter filter = new AndFilter ( ) ; filter . and ( new LikeFilter ( mgr . getUsersReturningAttribute ( LdapUserAttributeConstants . LDAP_USER_ATTRIBUTE_GIVEN_NAME ) , "*a*" ) ) ; try { LdapSearchManagerVO searchMgrVO = new LdapSearchManagerVO ( ) ; searchMgrVO . setFilter ( filter ) ; searchMgrVO . setAddUserClasses ( true ) ; ret = mgr . findUsers ( searchMgrVO ) ; } catch ( Exception e ) { } assertEquals ( 22 , ret . size ( ) ) ; }
test de busqueda de varios usuarios para active directory
