aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/zwobble
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/zwobble')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/documents/DocumentElementMakers.java13
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlReaderMakers.java11
2 files changed, 6 insertions, 18 deletions
diff --git a/src/test/java/org/zwobble/mammoth/tests/documents/DocumentElementMakers.java b/src/test/java/org/zwobble/mammoth/tests/documents/DocumentElementMakers.java
index f2d5317..0d83882 100644
--- a/src/test/java/org/zwobble/mammoth/tests/documents/DocumentElementMakers.java
+++ b/src/test/java/org/zwobble/mammoth/tests/documents/DocumentElementMakers.java
@@ -3,7 +3,6 @@ package org.zwobble.mammoth.tests.documents;
import com.google.common.collect.ImmutableList;
import com.natpryce.makeiteasy.Instantiator;
import com.natpryce.makeiteasy.Property;
-import com.natpryce.makeiteasy.PropertyLookup;
import org.zwobble.mammoth.documents.DocumentElement;
import org.zwobble.mammoth.documents.HasChildren;
import org.zwobble.mammoth.documents.Paragraph;
@@ -16,12 +15,8 @@ import static com.natpryce.makeiteasy.Property.newProperty;
public class DocumentElementMakers {
public static final Property<HasChildren, List<DocumentElement>> CHILDREN = newProperty();
- public static final Instantiator<Paragraph> PARAGRAPH = new Instantiator<Paragraph>() {
- @Override
- public Paragraph instantiate(PropertyLookup<Paragraph> propertyLookup) {
- return new Paragraph(
- Optional.empty(),
- propertyLookup.valueOf(CHILDREN, ImmutableList.of()));
- }
- };
+ public static final Instantiator<Paragraph> PARAGRAPH =
+ propertyLookup -> new Paragraph(
+ Optional.empty(),
+ propertyLookup.valueOf(CHILDREN, ImmutableList.of()));
}
diff --git a/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlReaderMakers.java b/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlReaderMakers.java
index a0748b9..6dafdee 100644
--- a/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlReaderMakers.java
+++ b/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlReaderMakers.java
@@ -1,9 +1,7 @@
package org.zwobble.mammoth.tests.docx;
-import com.google.common.collect.ImmutableMap;
import com.natpryce.makeiteasy.Instantiator;
import com.natpryce.makeiteasy.Property;
-import com.natpryce.makeiteasy.PropertyLookup;
import org.zwobble.mammoth.docx.BodyXmlReader;
import org.zwobble.mammoth.docx.Styles;
@@ -12,11 +10,6 @@ import static com.natpryce.makeiteasy.Property.newProperty;
public class BodyXmlReaderMakers {
public static final Property<BodyXmlReader, Styles> STYLES = newProperty();
- public 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())));
- }
- };
+ public static final Instantiator<BodyXmlReader> bodyReader =
+ propertyLookup -> new BodyXmlReader(propertyLookup.valueOf(STYLES, Styles.EMPTY));
}