diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-02-13 17:27:18 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-02-13 17:27:18 +0000 |
| commit | 60eb37495d7cda80853cded1f15c42e130885871 (patch) | |
| tree | 5541c6eedb4aed3b426f49b168800857b1f27436 | |
| parent | 5940b5961685346573684376b73ad841b0f214f5 (diff) | |
Add TODO to match python-mammoth
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java b/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java index 77ecd86..e6e38f8 100644 --- a/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java @@ -60,16 +60,6 @@ public class BodyXmlTests { } @Test - public void paragraphHasStyleIdReadFromParagraphPropertiesIfPresent() { - XmlElement element = paragraphXml(list( - element("w:pPr", list( - element("w:pStyle", map("w:val", "Heading1")))))); - assertThat( - read(a(bodyReader), element), - hasStyle(Optional.of(new Style("Heading1", Optional.empty())))); - } - - @Test public void whenParagraphHasStyleIdInStylesThenStyleNameIsReadFromStyles() { XmlElement element = paragraphXml(list( element("w:pPr", list( @@ -84,6 +74,17 @@ public class BodyXmlTests { hasStyle(Optional.of(style))); } + @Test + public void paragraphHasStyleIdReadFromParagraphPropertiesIfPresent() { + // TODO: emit warning due to missing style + XmlElement element = paragraphXml(list( + element("w:pPr", list( + element("w:pStyle", map("w:val", "Heading1")))))); + assertThat( + read(a(bodyReader), element), + hasStyle(Optional.of(new Style("Heading1", Optional.empty())))); + } + private static DocumentElement read(Maker<BodyXmlReader> reader, XmlElement element) { return reader.make().readElement(element).get(0); } |
