diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java | 12 | ||||
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/docx/DocumentXmlTests.java | 6 |
2 files changed, 9 insertions, 9 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 cc00d3c..90bf51a 100644 --- a/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java @@ -9,7 +9,7 @@ import com.natpryce.makeiteasy.PropertyLookup; import org.hamcrest.Matcher; import org.junit.Test; import org.zwobble.mammoth.documents.*; -import org.zwobble.mammoth.docx.BodyXml; +import org.zwobble.mammoth.docx.BodyXmlReader; import org.zwobble.mammoth.docx.Styles; import org.zwobble.mammoth.tests.DeepReflectionMatcher; import org.zwobble.mammoth.xml.XmlElement; @@ -29,12 +29,12 @@ import static org.zwobble.mammoth.tests.DeepReflectionMatcher.deepEquals; import static org.zwobble.mammoth.xml.XmlNodes.element; public class BodyXmlTests { - private static final Property<BodyXml, Styles> STYLES = newProperty(); + private static final Property<BodyXmlReader, Styles> STYLES = newProperty(); - private static final Instantiator<BodyXml> bodyReader = new Instantiator<BodyXml>() { + private static final Instantiator<BodyXmlReader> bodyReader = new Instantiator<BodyXmlReader>() { @Override - public BodyXml instantiate(PropertyLookup<BodyXml> propertyLookup) { - return new BodyXml( + public BodyXmlReader instantiate(PropertyLookup<BodyXmlReader> propertyLookup) { + return new BodyXmlReader( propertyLookup.valueOf(STYLES, new Styles(ImmutableMap.of(), ImmutableMap.of()))); } }; @@ -94,7 +94,7 @@ public class BodyXmlTests { hasStyle(Optional.of(style))); } - private static DocumentElement read(Maker<BodyXml> reader, XmlElement element) { + private static DocumentElement read(Maker<BodyXmlReader> reader, XmlElement element) { return reader.make().readElement(element).get(0); } diff --git a/src/test/java/org/zwobble/mammoth/tests/docx/DocumentXmlTests.java b/src/test/java/org/zwobble/mammoth/tests/docx/DocumentXmlTests.java index 114c1b0..11cbaa9 100644 --- a/src/test/java/org/zwobble/mammoth/tests/docx/DocumentXmlTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/docx/DocumentXmlTests.java @@ -6,8 +6,8 @@ import com.natpryce.makeiteasy.Property; import com.natpryce.makeiteasy.PropertyLookup; import org.junit.Test; import org.zwobble.mammoth.documents.*; -import org.zwobble.mammoth.docx.BodyXml; -import org.zwobble.mammoth.docx.DocumentXml; +import org.zwobble.mammoth.docx.BodyXmlReader; +import org.zwobble.mammoth.docx.DocumentXmlReader; import org.zwobble.mammoth.xml.XmlElement; import org.zwobble.mammoth.xml.XmlNodes; @@ -41,7 +41,7 @@ public class DocumentXmlTests { element("w:t", ImmutableList.of( XmlNodes.text("Hello!"))))))))))); - Document document = new DocumentXml(new BodyXml(null)).readDocumentXmlElement(documentElement); + Document document = new DocumentXmlReader(new BodyXmlReader(null)).readElement(documentElement); assertThat( document, |
