aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/DocumentToHtmlTests.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/java/org/zwobble/mammoth/tests/DocumentToHtmlTests.java b/src/test/java/org/zwobble/mammoth/tests/DocumentToHtmlTests.java
index 32e8702..0783ac2 100644
--- a/src/test/java/org/zwobble/mammoth/tests/DocumentToHtmlTests.java
+++ b/src/test/java/org/zwobble/mammoth/tests/DocumentToHtmlTests.java
@@ -132,6 +132,15 @@ public class DocumentToHtmlTests {
}
@Test
+ public void italicRunsCanBeMappedUsingStyleMapping() {
+ assertThat(
+ convertToHtml(
+ make(a(RUN, with(ITALIC, true), with(CHILDREN, list(new Text("Hello"))))),
+ StyleMap.builder().italic(HtmlPath.element("strong")).build()),
+ deepEquals(list(Html.element("strong", list(Html.text("Hello"))))));
+ }
+
+ @Test
public void underliningIsIgnoredByDefault() {
assertThat(
convertToHtml(make(a(RUN, with(UNDERLINE, true), with(CHILDREN, list(new Text("Hello")))))),