mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-07 11:48:02 -05:00
IMAP: new seen flag test case
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1162 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
a36576ce48
commit
b021c2b42f
@ -21,7 +21,6 @@ package davmail.imap;
|
|||||||
import davmail.AbstractDavMailTestCase;
|
import davmail.AbstractDavMailTestCase;
|
||||||
import davmail.DavGateway;
|
import davmail.DavGateway;
|
||||||
import davmail.Settings;
|
import davmail.Settings;
|
||||||
import org.apache.log4j.Level;
|
|
||||||
|
|
||||||
import javax.mail.MessagingException;
|
import javax.mail.MessagingException;
|
||||||
import javax.mail.Session;
|
import javax.mail.Session;
|
||||||
@ -169,7 +168,7 @@ public class TestImap extends AbstractDavMailTestCase {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testUidStoreSeenFlag() throws IOException {
|
public void testUidRemoveSeenFlag() throws IOException {
|
||||||
// remove seen flag
|
// remove seen flag
|
||||||
writeLine(". UID STORE "+messageUid+" FLAGS (\\Draft)");
|
writeLine(". UID STORE "+messageUid+" FLAGS (\\Draft)");
|
||||||
assertEquals(". OK STORE completed",readFullAnswer("."));
|
assertEquals(". OK STORE completed",readFullAnswer("."));
|
||||||
@ -226,6 +225,22 @@ public class TestImap extends AbstractDavMailTestCase {
|
|||||||
assertEquals(". OK UID FETCH completed",readFullAnswer("."));
|
assertEquals(". OK UID FETCH completed",readFullAnswer("."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testUidStoreSeenFlag() throws IOException {
|
||||||
|
// add Junk flag
|
||||||
|
writeLine(". UID STORE "+messageUid+" +FLAGS (\\Seen)");
|
||||||
|
assertEquals(". OK STORE completed",readFullAnswer("."));
|
||||||
|
writeLine(". UID FETCH "+messageUid+" (FLAGS)");
|
||||||
|
assertEquals("* 1 FETCH (UID "+messageUid+" FLAGS (\\Seen \\Draft))", readLine());
|
||||||
|
assertEquals(". OK UID FETCH completed",readFullAnswer("."));
|
||||||
|
|
||||||
|
// remove Junk flag
|
||||||
|
writeLine(". UID STORE "+messageUid+" -FLAGS (\\Seen)");
|
||||||
|
assertEquals(". OK STORE completed",readFullAnswer("."));
|
||||||
|
writeLine(". UID FETCH "+messageUid+" (FLAGS)");
|
||||||
|
assertEquals("* 1 FETCH (UID "+messageUid+" FLAGS (\\Draft))", readLine());
|
||||||
|
assertEquals(". OK UID FETCH completed",readFullAnswer("."));
|
||||||
|
}
|
||||||
|
|
||||||
public void testPartialFetch() throws IOException {
|
public void testPartialFetch() throws IOException {
|
||||||
writeLine(". UID FETCH "+messageUid+" (BODY.PEEK[1.MIME])");
|
writeLine(". UID FETCH "+messageUid+" (BODY.PEEK[1.MIME])");
|
||||||
assertEquals(". OK UID FETCH completed",readFullAnswer("."));
|
assertEquals(". OK UID FETCH completed",readFullAnswer("."));
|
||||||
|
Loading…
Reference in New Issue
Block a user