From c8ff305d5cbbbd472b6dc04c40f25c0190ff3a04 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jan 2016 10:59:27 +0000 Subject: Rename non-static readers --- .../java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java | 12 ++++++------ .../org/zwobble/mammoth/tests/docx/DocumentXmlTests.java | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/test') 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 STYLES = newProperty(); + private static final Property STYLES = newProperty(); - private static final Instantiator bodyReader = new Instantiator() { + private static final Instantiator bodyReader = new Instantiator() { @Override - public BodyXml instantiate(PropertyLookup propertyLookup) { - return new BodyXml( + public BodyXmlReader instantiate(PropertyLookup 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 reader, XmlElement element) { + private static DocumentElement read(Maker 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, -- cgit v1.2.3