aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/docx/BodyXmlTests.java18
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/docx/DocumentXmlTests.java10
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!")))))))))));
}
}