diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-02-13 22:38:53 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-02-13 22:38:53 +0000 |
| commit | 8d01886d494d8251c0825ca7d6df214d19415325 (patch) | |
| tree | 4a6755fff27f997c815418dabba20840aafd2322 /src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlReaderMakers.java | |
| parent | 6ae918357de9c9ff0b84e70016ea08aefeb48dea (diff) | |
Read v:imagedata
Diffstat (limited to 'src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlReaderMakers.java')
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlReaderMakers.java | 23 |
1 files changed, 18 insertions, 5 deletions
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 5758dce..41cefd5 100644 --- a/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlReaderMakers.java +++ b/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlReaderMakers.java @@ -2,10 +2,10 @@ package org.zwobble.mammoth.tests.docx; import com.natpryce.makeiteasy.Instantiator; import com.natpryce.makeiteasy.Property; -import org.zwobble.mammoth.docx.BodyXmlReader; -import org.zwobble.mammoth.docx.Numbering; -import org.zwobble.mammoth.docx.Relationships; -import org.zwobble.mammoth.docx.Styles; +import org.zwobble.mammoth.docx.*; + +import java.io.IOException; +import java.io.InputStream; import static com.natpryce.makeiteasy.Property.newProperty; @@ -13,10 +13,23 @@ public class BodyXmlReaderMakers { public static final Property<BodyXmlReader, Styles> STYLES = newProperty(); public static final Property<BodyXmlReader, Numbering> NUMBERING = newProperty(); public static final Property<BodyXmlReader, Relationships> RELATIONSHIPS = newProperty(); + public static final Property<BodyXmlReader, ContentTypes> CONTENT_TYPES = newProperty(); + public static final Property<BodyXmlReader, DocxFile> DOCX_FILE = newProperty(); public static final Instantiator<BodyXmlReader> bodyReader = propertyLookup -> new BodyXmlReader( propertyLookup.valueOf(STYLES, Styles.EMPTY), propertyLookup.valueOf(NUMBERING, Numbering.EMPTY), - propertyLookup.valueOf(RELATIONSHIPS, Relationships.EMPTY)); + propertyLookup.valueOf(RELATIONSHIPS, Relationships.EMPTY), + propertyLookup.valueOf(CONTENT_TYPES, ContentTypes.DEFAULT), + propertyLookup.valueOf(DOCX_FILE, new DocxFile() { + @Override + public InputStream getInputStream(String name) throws IOException { + throw new UnsupportedOperationException(); + } + + @Override + public void close() throws IOException { + } + })); } |
