From cf51080fc233196a5bf6c40c06e1a4ec32e85d5b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 19 Nov 2016 20:06:16 +0000 Subject: Add tests for combining custom and embedded style maps --- .../java/org/zwobble/mammoth/tests/MammothTests.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/test/java/org/zwobble') diff --git a/src/test/java/org/zwobble/mammoth/tests/MammothTests.java b/src/test/java/org/zwobble/mammoth/tests/MammothTests.java index 8454a3d..bafd857 100644 --- a/src/test/java/org/zwobble/mammoth/tests/MammothTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/MammothTests.java @@ -235,6 +235,22 @@ public class MammothTests { ); } + @Test + public void explicitStyleMapTakesPrecendenceOverEmbeddedStyleMap() throws IOException { + assertThat( + convertToHtml("embedded-style-map.docx", options -> options.addStyleMap("p => p")), + isSuccess("

Walking on imported air

") + ); + } + + @Test + public void explicitStyleMapIsCombinedWithEmbeddedStyleMap() throws IOException { + assertThat( + convertToHtml("embedded-style-map.docx", options -> options.addStyleMap("r => strong")), + isSuccess("

Walking on imported air

") + ); + } + @Test public void embeddedStyleMapCanBeWrittenAndThenRead() throws IOException { InMemoryArchive archive = InMemoryArchive.fromStream(new FileInputStream(TestData.file("single-paragraph.docx"))); -- cgit v1.2.3