use of com.zimbra.cs.account.SearchDirectoryOptions in project zm-mailbox by Zimbra.
the class TestLdapProvSearchDirectory method testBadFilter.
private void testBadFilter(String filter) throws Exception {
SearchDirectoryOptions options = new SearchDirectoryOptions();
options.setTypes(SearchDirectoryOptions.ObjectType.accounts);
options.setFilterString(FilterId.UNITTEST, filter);
options.setReturnAttrs(new String[] { Provisioning.A_zimbraId });
options.setConvertIDNToAscii(true);
String errorCode = null;
try {
prov.searchDirectory(options);
} catch (ServiceException e) {
errorCode = e.getCode();
}
assertEquals(LdapException.INVALID_SEARCH_FILTER, errorCode);
}
Aggregations