Search in sources :

Example 1 with GalRefMember

use of com.zimbra.cs.mailbox.ContactGroup.GalRefMember in project zm-mailbox by Zimbra.

the class TestContactGroup method getMembers.

@Test
public void getMembers() throws Exception {
    ContactGroup contactGroup = createContactGroup(new MemberData[] { new MemberData(Member.Type.CONTACT_REF, CONTACT_REF_VALUE), new MemberData(Member.Type.GAL_REF, GAL_REF_VALUE), new MemberData(Member.Type.INLINE, INLINE_VALUE) });
    List<Member> members = contactGroup.getMembers();
    assertEquals(3, members.size());
    assertTrue(members.get(0) instanceof ContactRefMember);
    assertEquals(CONTACT_REF_VALUE, members.get(0).getValue());
    assertTrue(members.get(1) instanceof GalRefMember);
    assertEquals(GAL_REF_VALUE, members.get(1).getValue());
    assertTrue(members.get(2) instanceof InlineMember);
    assertEquals(INLINE_VALUE, members.get(2).getValue());
}
Also used : ContactRefMember(com.zimbra.cs.mailbox.ContactGroup.ContactRefMember) GalRefMember(com.zimbra.cs.mailbox.ContactGroup.GalRefMember) InlineMember(com.zimbra.cs.mailbox.ContactGroup.InlineMember) ContactGroup(com.zimbra.cs.mailbox.ContactGroup) ContactRefMember(com.zimbra.cs.mailbox.ContactGroup.ContactRefMember) GalRefMember(com.zimbra.cs.mailbox.ContactGroup.GalRefMember) Member(com.zimbra.cs.mailbox.ContactGroup.Member) InlineMember(com.zimbra.cs.mailbox.ContactGroup.InlineMember) Test(org.junit.Test)

Aggregations

ContactGroup (com.zimbra.cs.mailbox.ContactGroup)1 ContactRefMember (com.zimbra.cs.mailbox.ContactGroup.ContactRefMember)1 GalRefMember (com.zimbra.cs.mailbox.ContactGroup.GalRefMember)1 InlineMember (com.zimbra.cs.mailbox.ContactGroup.InlineMember)1 Member (com.zimbra.cs.mailbox.ContactGroup.Member)1 Test (org.junit.Test)1