From 4f8c4b581f16551a364e203fd8142f7717101a2f Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jan 2016 14:42:50 +0000 Subject: Add list as shorter alias of ImmutableList.of --- .../java/org/zwobble/mammoth/tests/xml/XmlParserTests.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java') diff --git a/src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java b/src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java index c19ec4c..a14688f 100644 --- a/src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java @@ -1,7 +1,6 @@ package org.zwobble.mammoth.tests.xml; import com.google.common.collect.ImmutableBiMap; -import com.google.common.collect.ImmutableList; import org.hamcrest.Matcher; import org.hamcrest.collection.IsEmptyIterable; import org.hamcrest.collection.IsIterableContainingInOrder; @@ -17,6 +16,7 @@ import java.util.Map; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; +import static org.zwobble.mammoth.util.MammothLists.list; import static org.zwobble.mammoth.util.MammothMaps.map; public class XmlParserTests { @@ -50,8 +50,8 @@ public class XmlParserTests { public void canParseElementWithDescendantElements() { assertThat( parser.parseString(""), - isElement("body", map(), ImmutableList.of( - isElement("a", map(), ImmutableList.of( + isElement("body", map(), list( + isElement("a", map(), list( isElement("b"))), isElement("a")))); } @@ -60,7 +60,7 @@ public class XmlParserTests { public void canParseTextNodes() { assertThat( parser.parseString("Hello!"), - isElement("body", map(), ImmutableList.of( + isElement("body", map(), list( isTextNode("Hello!")))); } @@ -106,7 +106,7 @@ public class XmlParserTests { } private Matcher isElement(String name, Map attributes) { - return isElement(name, attributes, ImmutableList.of()); + return isElement(name, attributes, list()); } private Matcher isElement(String name, Map attributes, List> children) { -- cgit v1.2.3