aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/zwobble
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-02-13 17:27:18 +0000
committerMichael Williamson <mike@zwobble.org>2016-02-13 17:27:18 +0000
commit60eb37495d7cda80853cded1f15c42e130885871 (patch)
tree5541c6eedb4aed3b426f49b168800857b1f27436 /src/test/java/org/zwobble
parent5940b5961685346573684376b73ad841b0f214f5 (diff)
Add TODO to match python-mammoth
Diffstat (limited to 'src/test/java/org/zwobble')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java21
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);
}