From 3a83dfa0318e00847c88119a18c1614df790e3fb Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 26 Mar 2016 17:50:01 +0000 Subject: Remove Guava usage from XML parsing --- src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test/java/org') 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 7e8cc09..8b26de4 100644 --- a/src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java @@ -1,10 +1,10 @@ package org.zwobble.mammoth.tests.xml; -import com.google.common.collect.ImmutableBiMap; import org.hamcrest.Matcher; import org.hamcrest.collection.IsEmptyIterable; import org.hamcrest.collection.IsIterableContainingInOrder; import org.junit.Test; +import org.zwobble.mammoth.internal.xml.NamespacePrefixes; import org.zwobble.mammoth.internal.xml.XmlElement; import org.zwobble.mammoth.internal.xml.XmlNode; import org.zwobble.mammoth.internal.xml.XmlTextNode; @@ -20,7 +20,7 @@ import static org.zwobble.mammoth.internal.util.MammothLists.list; import static org.zwobble.mammoth.internal.util.MammothMaps.map; public class XmlParserTests { - private final XmlParser parser = new XmlParser(ImmutableBiMap.of()); + private final XmlParser parser = new XmlParser(new NamespacePrefixes(map())); @Test public void canParseSelfClosingElement() { @@ -80,7 +80,7 @@ public class XmlParserTests { @Test public void mappedNamespaceUrisInElementNamesArePrefixedToLocalNameWithColon() { - XmlParser parser = new XmlParser(ImmutableBiMap.of("x", "word")); + XmlParser parser = new XmlParser(NamespacePrefixes.builder().put("x", "word").build()); assertThat( parser.parseString(""), isElement("x:body")); @@ -88,7 +88,7 @@ public class XmlParserTests { @Test public void mappedNamespaceUrisInAttributeNamesArePrefixedToLocalNameWithColon() { - XmlParser parser = new XmlParser(ImmutableBiMap.of("x", "word")); + XmlParser parser = new XmlParser(NamespacePrefixes.builder().put("x", "word").build()); assertThat( parser.parseString(""), isElement("body", map("x:name", "bob"))); -- cgit v1.2.3