From ea37dde406b1c7fc35f72216882b7732d6ee5445 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jan 2016 11:57:51 +0000 Subject: Make body readers using make-it-easy in tests --- .../java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java') 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 cae7410..862f014 100644 --- a/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java @@ -2,10 +2,7 @@ package org.zwobble.mammoth.tests.docx; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import com.natpryce.makeiteasy.Instantiator; import com.natpryce.makeiteasy.Maker; -import com.natpryce.makeiteasy.Property; -import com.natpryce.makeiteasy.PropertyLookup; import org.hamcrest.Matcher; import org.junit.Test; import org.zwobble.mammoth.documents.*; @@ -21,23 +18,15 @@ import java.util.Optional; import static com.natpryce.makeiteasy.MakeItEasy.a; import static com.natpryce.makeiteasy.MakeItEasy.with; -import static com.natpryce.makeiteasy.Property.newProperty; import static java.util.Arrays.asList; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasProperty; import static org.zwobble.mammoth.tests.DeepReflectionMatcher.deepEquals; +import static org.zwobble.mammoth.tests.docx.BodyXmlReaderMakers.STYLES; +import static org.zwobble.mammoth.tests.docx.BodyXmlReaderMakers.bodyReader; import static org.zwobble.mammoth.xml.XmlNodes.element; public class BodyXmlTests { - private static final Property STYLES = newProperty(); - - private static final Instantiator bodyReader = new Instantiator() { - @Override - public BodyXmlReader instantiate(PropertyLookup propertyLookup) { - return new BodyXmlReader( - propertyLookup.valueOf(STYLES, new Styles(ImmutableMap.of(), ImmutableMap.of()))); - } - }; @Test public void textFromTextElementIsRead() { -- cgit v1.2.3