diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-01-03 11:10:45 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-01-03 11:10:45 +0000 |
| commit | 2089c7351dbe66e1bdb1071efdb81d9e3f6b349e (patch) | |
| tree | 6a49ddffef819cb95b39d598f1bcdbe48f39e13e /src/test/java | |
| parent | b3444db75e6575335fdfc4b75c7e9f9fab5bee85 (diff) | |
Rename document elements to drop Element suffix
Diffstat (limited to 'src/test/java')
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java | 18 | ||||
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/docx/DocumentXmlTests.java | 10 |
2 files changed, 14 insertions, 14 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 90bf51a..cae7410 100644 --- a/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java @@ -114,31 +114,31 @@ public class BodyXmlTests { return element("w:t", ImmutableList.of(XmlNodes.text(value))); } - private Matcher<DocumentElement> isParagraph(ParagraphElement expected) { + private Matcher<DocumentElement> isParagraph(Paragraph expected) { return new DeepReflectionMatcher<>(expected); } - private Matcher<DocumentElement> isRun(RunElement expected) { + private Matcher<DocumentElement> isRun(Run expected) { return new DeepReflectionMatcher<>(expected); } private Matcher<DocumentElement> isTextElement(String value) { - return new DeepReflectionMatcher<>(new TextElement(value)); + return new DeepReflectionMatcher<>(new Text(value)); } private Matcher<? super DocumentElement> hasStyle(Optional<Style> expected) { return hasProperty("style", deepEquals(expected)); } - private ParagraphElement paragraph(DocumentElement... children) { - return new ParagraphElement(Optional.empty(), asList(children)); + private Paragraph paragraph(DocumentElement... children) { + return new Paragraph(Optional.empty(), asList(children)); } - private RunElement run(DocumentElement... children) { - return new RunElement(asList(children)); + private Run run(DocumentElement... children) { + return new Run(asList(children)); } - private TextElement text(String value) { - return new TextElement(value); + private Text text(String value) { + return new Text(value); } } 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 11cbaa9..9225d0d 100644 --- a/src/test/java/org/zwobble/mammoth/tests/docx/DocumentXmlTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/docx/DocumentXmlTests.java @@ -23,10 +23,10 @@ import static org.zwobble.mammoth.xml.XmlNodes.element; public class DocumentXmlTests { private static final Property<HasChildren, List<DocumentElement>> CHILDREN = newProperty(); - private static final Instantiator<ParagraphElement> paragraph = new Instantiator<ParagraphElement>() { + private static final Instantiator<Paragraph> paragraph = new Instantiator<Paragraph>() { @Override - public ParagraphElement instantiate(PropertyLookup<ParagraphElement> propertyLookup) { - return new ParagraphElement( + public Paragraph instantiate(PropertyLookup<Paragraph> propertyLookup) { + return new Paragraph( Optional.empty(), propertyLookup.valueOf(CHILDREN, ImmutableList.of())); } @@ -47,7 +47,7 @@ public class DocumentXmlTests { document, deepEquals(new Document(ImmutableList.of( make(a(paragraph, with(CHILDREN, ImmutableList.of( - new RunElement(ImmutableList.of( - new TextElement("Hello!"))))))))))); + new Run(ImmutableList.of( + new Text("Hello!"))))))))))); } } |
