Search in sources :

Example 1 with CopyCommand

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

the class ImapCommandThrottleTest method copy.

@Test
public void copy() {
    String destFolder = "destFolder";
    String sequenceSet = "10:20";
    CopyCommand copy = new CopyCommand(sequenceSet, new ImapPath(destFolder, null));
    Assert.assertTrue("same obj", copy.isDuplicate(copy));
    CopyCommand copy2 = new CopyCommand(sequenceSet, new ImapPath(destFolder, null));
    Assert.assertTrue("diff obj same fields", copy.isDuplicate(copy2));
    CopyCommand copy3 = new CopyCommand(sequenceSet, new ImapPath(destFolder + "foo", null));
    Assert.assertFalse("diff dest path", copy.isDuplicate(copy3));
    CopyCommand copy4 = new CopyCommand("20:30", new ImapPath(destFolder + "foo", null));
    Assert.assertFalse("diff dest path", copy.isDuplicate(copy4));
}
Also used : CopyCommand(com.zimbra.cs.imap.CopyCommand) ImapPath(com.zimbra.cs.imap.ImapPath) Test(org.junit.Test)

Aggregations

CopyCommand (com.zimbra.cs.imap.CopyCommand)1 ImapPath (com.zimbra.cs.imap.ImapPath)1 Test (org.junit.Test)1