Skip to content

Commit

Permalink
#332: Added test case for embedded image parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
bbottema committed Dec 26, 2021
1 parent dc273cb commit 0392691
Show file tree
Hide file tree
Showing 2 changed files with 1,711 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,13 @@ public void testOutlookMessageWithEmptyAttachments() {
Email s2 = EmailConverter.outlookMsgToEmail(new File(RESOURCE_TEST_MESSAGES + "/#318 Email with nodata-attachment2.msg"));
assertThat(s2.getAttachments()).extracting("name").containsExactlyInAnyOrder("ETS Andre Glotz SA CP 1.doc");
}

@Test
public void testIt() {
Email s1 = EmailConverter.emlToEmail(new File(RESOURCE_TEST_MESSAGES + "/#332 Email with problematic embedded image.eml"));
assertThat(s1.getAttachments()).isEmpty();
assertThat(s1.getEmbeddedImages()).extracting("name")
.containsExactly("DB294AA3-160F-4825-923A-B16C8B674543@home");
assertThat(s1.getHTMLText()).containsPattern("\"cid:DB294AA3-160F-4825-923A-B16C8B674543@home\"");
}
}
Loading

0 comments on commit 0392691

Please # to comment.