diff --git a/src/test/java/org/simplejavamail/outlookmessageparser/HighoverEmailsTest.java b/src/test/java/org/simplejavamail/outlookmessageparser/HighoverEmailsTest.java index 5aca9ab..567c822 100644 --- a/src/test/java/org/simplejavamail/outlookmessageparser/HighoverEmailsTest.java +++ b/src/test/java/org/simplejavamail/outlookmessageparser/HighoverEmailsTest.java @@ -760,9 +760,7 @@ public void testHtmlTestWithReplyToAndAttachmentsPlusEmbeddedImage() assertThat(normalizeText(msg.getBodyText())).isEqualTo("We should meet up!\n"); // Outlook overrode this value too OR converted the original HTML to RTF, from which OutlookMessageParser derived this HTML assertThat(normalizeText(msg.getConvertedBodyHTML())).isEqualTo( - " \n" + - " We should meet up! \n" + - " "); + "We should meet up!"); // the RTF was probably created by Outlook based on the HTML when the message was saved assertThat(msg.getBodyRTF()).isNotEmpty(); List outlookAttachments = msg.getOutlookAttachments(); diff --git a/src/test/java/org/simplejavamail/outlookmessageparser/TestUtils.java b/src/test/java/org/simplejavamail/outlookmessageparser/TestUtils.java index 3722a4f..746b8eb 100644 --- a/src/test/java/org/simplejavamail/outlookmessageparser/TestUtils.java +++ b/src/test/java/org/simplejavamail/outlookmessageparser/TestUtils.java @@ -19,12 +19,14 @@ import java.net.URISyntaxException; import java.nio.charset.Charset; import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; public class TestUtils { public static String classpathFileToString(String classPathFile, Charset charset) { try { - return new String(Files.readAllBytes(Paths.get(TestUtils.class.getResource(classPathFile).toURI()))); + Path path = Paths.get(TestUtils.class.getResource(classPathFile).toURI()); + return Files.readString(path, charset); } catch (IOException | URISyntaxException e) { throw new RuntimeException(e); } diff --git a/src/test/resources/test-messages/chinese message.html b/src/test/resources/test-messages/chinese message.html index ae794b2..bb962b6 100644 --- a/src/test/resources/test-messages/chinese message.html +++ b/src/test/resources/test-messages/chinese message.html @@ -1,1037 +1,588 @@ - - - - - - - - - - - - - - - - - -
-

- - -  - - - - -

-

- - -  - - - - -

-

- - - Dears - - - - - - : - - - - - - - - - -

-

- - - -  -  -  -  -  - - - - - - 经过汇总 大家提前合理安排进房间入住吧。 - - - - - - - - - -

-

- - - -  - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - 房型 - - - - - - - - -

-
-

- - 时间段 - - - - - - - - -

-
-

- - 迷你房 - - - - - - - - -

-
-

- - 全天 - - - - - - - - -

-
-

- - 大床房 - - - - - - - - -

-
-

- - 9:00-12:00 - - - - - - -

-
-

- - 小床房 - - - - - - - - -

-
-

- - 1:00-15:30 - - - - - - -

-
-

- - 标准房 - - - - - - - - -

-
-

- - 15:30-18:00 - - - - - - -

-
-

- - 三床房 - - - - - - - - -

-
-

- - 全天 - - - - - - - - -

-
-

- - 四床房 - - - - - - - - -

-
-

- - 全天 - - - - - - - - -

-
-

- - - -  - - - - - -

-

- - - -  - - - - - -

-

- - Best Regards - - - - - - -

-

- - Tha - - - - 你 - - - - - - - - -

-

- - --------------------------------- - - - - - - -

-

- - 郝竹林 - - - - - - - - -

-

- - Seat: 15#3F093 | TEL: 737057 - - - - - - -

-

- - 酒店研发部 - - - - - - - - -

- - -

- - -  - - - - -

-
- - \ No newline at end of file +

 

 

Dears

      经过汇总 大家提前合理安排进房间入住吧。

 

房型

时间段

迷你房

全天

大床房

9:00-12:00

小床房

1:00-15:30

标准房

15:30-18:00

三床房

全天

四床房

全天

 

 

Best Regards

Tha

---------------------------------

郝竹林

Seat: 15#3F093 | TEL: 737057

酒店研发部

 

\ No newline at end of file