From e0cf7240fe37c5f44b66563db29c07bc1188805b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 26 Sep 2015 17:39:28 +0100 Subject: Add test for attribute names with URIs --- src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (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 1b6ee60..ff5072f 100644 --- a/src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java @@ -58,9 +58,16 @@ public class XmlParserTests { } @Test - public void unmappedNamespaceUrisAreIncludedInBracesAsPrefix() { + public void unmappedNamespaceUrisInElementNamesAreIncludedInBracesAsPrefix() { assertThat( XmlParser.parseString(""), is(new XmlElement("{word}body"))); } + + @Test + public void unmappedNamespaceUrisInAttributeNamesAreIncludedInBracesAsPrefix() { + assertThat( + XmlParser.parseString(""), + is(new XmlElement("body", ImmutableMap.of("{word}name", "bob")))); + } } -- cgit v1.2.3