From a431972f98d98114dc9a5a65a3fbaf68967a8161 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 13 Feb 2016 18:18:33 +0000 Subject: Add result objects --- .../org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/test/java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java') diff --git a/src/test/java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java b/src/test/java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java index b8ada2e..d18cbe3 100644 --- a/src/test/java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java @@ -1,6 +1,7 @@ package org.zwobble.mammoth.tests.docx; import org.junit.Test; +import org.zwobble.mammoth.Result; import org.zwobble.mammoth.documents.Note; import org.zwobble.mammoth.docx.BodyXmlReader; import org.zwobble.mammoth.docx.NotesXmlReader; @@ -11,6 +12,7 @@ import java.util.List; import static com.natpryce.makeiteasy.MakeItEasy.a; import static com.natpryce.makeiteasy.MakeItEasy.make; import static org.hamcrest.MatcherAssert.assertThat; +import static org.zwobble.mammoth.Result.success; import static org.zwobble.mammoth.tests.DeepReflectionMatcher.deepEquals; import static org.zwobble.mammoth.tests.documents.DocumentElementMakers.PARAGRAPH; import static org.zwobble.mammoth.util.MammothLists.list; @@ -27,11 +29,11 @@ public class NotesXmlReaderTests { element("w:p"))))); NotesXmlReader reader = new NotesXmlReader(bodyReader, "footnote"); - List notes = reader.readElement(element); + Result> notes = reader.readElement(element); assertThat( notes, - deepEquals(list(new Note("1", list(make(a(PARAGRAPH))))))); + deepEquals(success(list(new Note("1", list(make(a(PARAGRAPH)))))))); } @Test @@ -50,8 +52,8 @@ public class NotesXmlReaderTests { element("w:p"))))); NotesXmlReader reader = new NotesXmlReader(bodyReader, "footnote"); - List notes = reader.readElement(element); + Result> notes = reader.readElement(element); - assertThat(notes, deepEquals(list())); + assertThat(notes, deepEquals(success(list()))); } } -- cgit v1.2.3