aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-01-03 11:57:51 +0000
committerMichael Williamson <mike@zwobble.org>2016-01-03 11:57:51 +0000
commitea37dde406b1c7fc35f72216882b7732d6ee5445 (patch)
treec97cff59e098ca9f5d92758cf5cb49ca77275b5c /src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java
parent8733a942ec5e53a1f4d5ac78ffaaf8badfdee2cf (diff)
Make body readers using make-it-easy in tests
Diffstat (limited to 'src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java15
1 files changed, 2 insertions, 13 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 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<BodyXmlReader, Styles> STYLES = newProperty();
-
- private static final Instantiator<BodyXmlReader> bodyReader = new Instantiator<BodyXmlReader>() {
- @Override
- public BodyXmlReader instantiate(PropertyLookup<BodyXmlReader> propertyLookup) {
- return new BodyXmlReader(
- propertyLookup.valueOf(STYLES, new Styles(ImmutableMap.of(), ImmutableMap.of())));
- }
- };
@Test
public void textFromTextElementIsRead() {