aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/zwobble/mammoth/tests/xml
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-01-03 14:42:50 +0000
committerMichael Williamson <mike@zwobble.org>2016-01-03 14:42:50 +0000
commit4f8c4b581f16551a364e203fd8142f7717101a2f (patch)
tree077bb2fd98d675a039478980b90ffe77616de42f /src/test/java/org/zwobble/mammoth/tests/xml
parent6e97bf5bb28ad5a63f396873399a457be6fe779d (diff)
Add list as shorter alias of ImmutableList.of
Diffstat (limited to 'src/test/java/org/zwobble/mammoth/tests/xml')
-rw-r--r--src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java10
1 files changed, 5 insertions, 5 deletions
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("<body><a><b/></a><a/></body>"),
- 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("<body>Hello!</body>"),
- isElement("body", map(), ImmutableList.of(
+ isElement("body", map(), list(
isTextNode("Hello!"))));
}
@@ -106,7 +106,7 @@ public class XmlParserTests {
}
private Matcher<XmlElement> isElement(String name, Map<String, String> attributes) {
- return isElement(name, attributes, ImmutableList.of());
+ return isElement(name, attributes, list());
}
private Matcher<XmlElement> isElement(String name, Map<String, String> attributes, List<Matcher<? extends XmlNode>> children) {