diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-01-03 14:42:50 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-01-03 14:42:50 +0000 |
| commit | 4f8c4b581f16551a364e203fd8142f7717101a2f (patch) | |
| tree | 077bb2fd98d675a039478980b90ffe77616de42f /src/test/java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java | |
| parent | 6e97bf5bb28ad5a63f396873399a457be6fe779d (diff) | |
Add list as shorter alias of ImmutableList.of
Diffstat (limited to 'src/test/java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java')
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java | 14 |
1 files changed, 7 insertions, 7 deletions
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 58edf54..b8ada2e 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,5 @@ package org.zwobble.mammoth.tests.docx; -import com.google.common.collect.ImmutableList; import org.junit.Test; import org.zwobble.mammoth.documents.Note; import org.zwobble.mammoth.docx.BodyXmlReader; @@ -14,6 +13,7 @@ import static com.natpryce.makeiteasy.MakeItEasy.make; import static org.hamcrest.MatcherAssert.assertThat; 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; import static org.zwobble.mammoth.util.MammothMaps.map; import static org.zwobble.mammoth.xml.XmlNodes.element; @@ -22,8 +22,8 @@ public class NotesXmlReaderTests { @Test public void idAndBodyOfFootnoteAreRead() { - XmlElement element = element("w:footnotes", ImmutableList.of( - element("w:footnote", map("w:id", "1"), ImmutableList.of( + XmlElement element = element("w:footnotes", list( + element("w:footnote", map("w:id", "1"), list( element("w:p"))))); NotesXmlReader reader = new NotesXmlReader(bodyReader, "footnote"); @@ -31,7 +31,7 @@ public class NotesXmlReaderTests { assertThat( notes, - deepEquals(ImmutableList.of(new Note("1", ImmutableList.of(make(a(PARAGRAPH))))))); + deepEquals(list(new Note("1", list(make(a(PARAGRAPH))))))); } @Test @@ -45,13 +45,13 @@ public class NotesXmlReaderTests { } private void assertFootnoteTypeIsIgnored(String noteType) { - XmlElement element = element("w:footnotes", ImmutableList.of( - element("w:footnote", map("w:id", "1", "w:type", noteType), ImmutableList.of( + XmlElement element = element("w:footnotes", list( + element("w:footnote", map("w:id", "1", "w:type", noteType), list( element("w:p"))))); NotesXmlReader reader = new NotesXmlReader(bodyReader, "footnote"); List<Note> notes = reader.readElement(element); - assertThat(notes, deepEquals(ImmutableList.of())); + assertThat(notes, deepEquals(list())); } } |
