Search in sources :

Example 6 with IDInfo

use of com.zimbra.cs.mailclient.imap.IDInfo in project zm-mailbox by Zimbra.

the class TestImapClient method testID.

@Test
public void testID() throws Exception {
    IDInfo id = new IDInfo();
    id.put(IDInfo.NAME, "foo");
    assertEquals("foo", id.get(IDInfo.NAME));
    assertEquals("foo", id.get("Name"));
    connect();
    IDInfo id1 = connection.id(id);
    assertNotNull(id1);
    assertEquals("Zimbra", id1.get(IDInfo.NAME));
    IDInfo id2 = connection.id(new IDInfo());
    assertEquals(id1.get(IDInfo.NAME), id2.get(IDInfo.NAME));
    assertEquals(id1.get(IDInfo.VERSION), id2.get(IDInfo.VERSION));
}
Also used : IDInfo(com.zimbra.cs.mailclient.imap.IDInfo) Test(org.junit.Test)

Aggregations

IDInfo (com.zimbra.cs.mailclient.imap.IDInfo)6 Test (org.junit.Test)3 CommandFailedException (com.zimbra.cs.mailclient.CommandFailedException)1 ImapConfig (com.zimbra.cs.mailclient.imap.ImapConfig)1 ImapConnection (com.zimbra.cs.mailclient.imap.ImapConnection)1 Ignore (org.junit.Ignore)1