diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-02-14 11:19:05 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-02-14 11:19:05 +0000 |
| commit | ae5ded5955978970cbe992fd41628eb2cb3d4b23 (patch) | |
| tree | 5e83172ef682613c5f3ba2f2b22f073aecec6bb6 /src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java | |
| parent | 2ffae2608b8634c11a02924d3342d6e8cc6c02fe (diff) | |
Wrap bold runs in <strong>
Diffstat (limited to 'src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java')
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java b/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java index 6152822..0a35512 100644 --- a/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/DocumentConverterTests.java @@ -4,6 +4,7 @@ import org.junit.Test; import org.zwobble.mammoth.DocumentConverter; import org.zwobble.mammoth.documents.Document; import org.zwobble.mammoth.documents.DocumentElement; +import org.zwobble.mammoth.documents.Text; import org.zwobble.mammoth.html.Html; import org.zwobble.mammoth.html.HtmlNode; @@ -35,6 +36,14 @@ public class DocumentConverterTests { Html.element("p", list(Html.text("there")))))); } + @Test + 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")))))); + } + private List<HtmlNode> convertToHtml(DocumentElement element) { return DocumentConverter.convertToHtml(element); |
