aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/zwobble/mammoth
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-01-03 10:59:27 +0000
committerMichael Williamson <mike@zwobble.org>2016-01-03 10:59:27 +0000
commitc8ff305d5cbbbd472b6dc04c40f25c0190ff3a04 (patch)
tree39560a49a803ce99bb223bcafe3b946e34fb0350 /src/test/java/org/zwobble/mammoth
parentd5da134fe3107acc53987ed6ca89cefd72e0397e (diff)
Rename non-static readers
Diffstat (limited to 'src/test/java/org/zwobble/mammoth')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java12
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/docx/DocumentXmlTests.java6
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,