1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-12 10:42:21 -05:00

Additional IMAP unit tests

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2195 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2013-11-13 21:56:09 +00:00
parent 37444766f5
commit c6dd341f4a

View File

@ -535,10 +535,31 @@ public class TestImap extends AbstractImapTestCase {
assertEquals(". OK UID FETCH completed", readFullAnswer(".")); assertEquals(". OK UID FETCH completed", readFullAnswer("."));
} }
public void testBodyTextFetch() throws IOException {
writeLine(". SELECT INBOX");
assertEquals(". OK [READ-WRITE] SELECT completed", readFullAnswer("."));
writeLine(". UID FETCH 1:* (BODY[HEADER] BODY.PEEK[TEXT])");
assertEquals(". OK UID FETCH completed", readFullAnswer("."));
}
public void testBodyPartFetch() throws IOException {
writeLine(". SELECT INBOX");
assertEquals(". OK [READ-WRITE] SELECT completed", readFullAnswer("."));
writeLine(". UID FETCH 1:* (RFC822.SIZE BODY[1])");
assertEquals(". OK UID FETCH completed", readFullAnswer("."));
}
public void testOutlookHeaderFetch() throws IOException { public void testOutlookHeaderFetch() throws IOException {
writeLine(". SELECT INBOX"); writeLine(". SELECT INBOX");
assertEquals(". OK [READ-WRITE] SELECT completed", readFullAnswer(".")); assertEquals(". OK [READ-WRITE] SELECT completed", readFullAnswer("."));
writeLine(". UID FETCH 1:* (UID FLAGS RFC822.SIZE BODY.PEEK[HEADER] INTERNALDATE)"); writeLine(". UID FETCH 1:* (UID FLAGS RFC822.SIZE BODY.PEEK[HEADER] INTERNALDATE)");
assertEquals(". OK UID FETCH completed", readFullAnswer(".")); assertEquals(". OK UID FETCH completed", readFullAnswer("."));
} }
public void testFullHeaderFetch() throws IOException {
writeLine(". SELECT INBOX");
assertEquals(". OK [READ-WRITE] SELECT completed", readFullAnswer("."));
writeLine(". UID FETCH 1:* RFC822.HEADER");
assertEquals(". OK UID FETCH completed", readFullAnswer("."));
}
} }