use of com.zimbra.cs.ldap.ZLdapFilter in project zm-mailbox by Zimbra.
the class TestLdapZLdapFilter method dynamicGroupById.
@Test
public void dynamicGroupById() throws Exception {
String ID = genUUID();
String filter = LegacyLdapFilter.dynamicGroupById(ID);
ZLdapFilter zLdapFilter = filterDactory.dynamicGroupById(ID);
verify(FilterId.DYNAMIC_GROUP_BY_ID, filter, zLdapFilter);
}
use of com.zimbra.cs.ldap.ZLdapFilter in project zm-mailbox by Zimbra.
the class TestLdapZLdapFilter method CMBSearchAccountsOnly.
@Test
public void CMBSearchAccountsOnly() throws Exception {
/*
orig filter before refactoring
String legacyFilter =
"(&(|(!(zimbraExcludeFromCMBSearch=*))(zimbraExcludeFromCMBSearch=FALSE))(&(objectClass=zimbraAccount)(!(objectClass=zimbraCalendarResource))))";
*/
// moved objectClass to the front
String legacyFilter = "(&(&(objectClass=zimbraAccount)(!(objectClass=zimbraCalendarResource)))(|(!(zimbraExcludeFromCMBSearch=*))(zimbraExcludeFromCMBSearch=FALSE)))";
String filter = LegacyLdapFilter.CMBSearchAccountsOnly();
ZLdapFilter zLdapFilter = filterDactory.CMBSearchAccountsOnly();
assertEquals(legacyFilter, filter);
verify(FilterId.CMB_SEARCH_ACCOUNTS_ONLY, filter, zLdapFilter);
}
use of com.zimbra.cs.ldap.ZLdapFilter in project zm-mailbox by Zimbra.
the class TestLdapZLdapFilter method calendarResourceByForeignPrincipal.
@Test
public void calendarResourceByForeignPrincipal() throws Exception {
String FOREIGN_PRINCIPAL = getTestName();
String filter = LegacyLdapFilter.calendarResourceByForeignPrincipal(FOREIGN_PRINCIPAL);
ZLdapFilter zLdapFilter = filterDactory.calendarResourceByForeignPrincipal(FOREIGN_PRINCIPAL);
verify(FilterId.CALENDAR_RESOURCE_BY_FOREIGN_PRINCIPAL, filter, zLdapFilter);
}
use of com.zimbra.cs.ldap.ZLdapFilter in project zm-mailbox by Zimbra.
the class TestLdapZLdapFilter method accountById.
@Test
public void accountById() throws Exception {
String ID = genUUID();
String filter = LegacyLdapFilter.accountById(ID);
ZLdapFilter zLdapFilter = filterDactory.accountById(ID);
verify(FilterId.ACCOUNT_BY_ID, filter, zLdapFilter);
}
use of com.zimbra.cs.ldap.ZLdapFilter in project zm-mailbox by Zimbra.
the class TestLdapZLdapFilter method signatureById.
@Test
public void signatureById() throws Exception {
String ID = genUUID();
String filter = LegacyLdapFilter.signatureById(ID);
ZLdapFilter zLdapFilter = filterDactory.signatureById(ID);
verify(FilterId.SIGNATURE_BY_ID, filter, zLdapFilter);
}
Aggregations