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));
}
Aggregations