From 4f8ad8f0588564679cb8ccb9ae4592738810d800 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jan 2016 14:36:59 +0000 Subject: Add map as shorter alias for ImmutableMap.of --- .../java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 16d14ad..58edf54 100644 --- a/src/test/java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/docx/NotesXmlReaderTests.java @@ -1,7 +1,6 @@ package org.zwobble.mammoth.tests.docx; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; import org.junit.Test; import org.zwobble.mammoth.documents.Note; import org.zwobble.mammoth.docx.BodyXmlReader; @@ -15,6 +14,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.MammothMaps.map; import static org.zwobble.mammoth.xml.XmlNodes.element; public class NotesXmlReaderTests { @@ -23,7 +23,7 @@ public class NotesXmlReaderTests { @Test public void idAndBodyOfFootnoteAreRead() { XmlElement element = element("w:footnotes", ImmutableList.of( - element("w:footnote", ImmutableMap.of("w:id", "1"), ImmutableList.of( + element("w:footnote", map("w:id", "1"), ImmutableList.of( element("w:p"))))); NotesXmlReader reader = new NotesXmlReader(bodyReader, "footnote"); @@ -46,7 +46,7 @@ public class NotesXmlReaderTests { private void assertFootnoteTypeIsIgnored(String noteType) { XmlElement element = element("w:footnotes", ImmutableList.of( - element("w:footnote", ImmutableMap.of("w:id", "1", "w:type", noteType), ImmutableList.of( + element("w:footnote", map("w:id", "1", "w:type", noteType), ImmutableList.of( element("w:p"))))); NotesXmlReader reader = new NotesXmlReader(bodyReader, "footnote"); -- cgit v1.2.3