aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/zwobble
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/zwobble')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java b/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java
index 0a35512..d2dd75f 100644
--- a/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java
+++ b/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java
@@ -40,10 +40,16 @@ public class DocumentConverterTests {
public void boldRunsAreWrappedInStrongTags() {
assertThat(
convertToHtml(make(a(RUN, with(BOLD, true), with(CHILDREN, list(new Text("Hello")))))),
-
deepEquals(list(Html.element("strong", list(Html.text("Hello"))))));
}
+ @Test
+ public void italicRunsAreWrappedInEmphasisTags() {
+ assertThat(
+ convertToHtml(make(a(RUN, with(ITALIC, true), with(CHILDREN, list(new Text("Hello")))))),
+ deepEquals(list(Html.element("em", list(Html.text("Hello"))))));
+ }
+
private List<HtmlNode> convertToHtml(DocumentElement element) {
return DocumentConverter.convertToHtml(element);