diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-03-26 17:50:01 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-03-26 17:55:50 +0000 |
| commit | 3a83dfa0318e00847c88119a18c1614df790e3fb (patch) | |
| tree | 1182f01ff99609b10c3a9c017b0f7a456b0abbfb /src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java | |
| parent | 9eb7942ae589c6418d12dbde7c6ae1ffdcf3d1cd (diff) | |
Remove Guava usage from XML parsing
Diffstat (limited to 'src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java')
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java | 8 |
1 files changed, 4 insertions, 4 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 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("<w:body xmlns:w='word'/>"), 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("<body xmlns:w='word' w:name='bob'/>"), isElement("body", map("x:name", "bob"))); |
