diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/xml/XmlParserTests.java | 9 |
1 files changed, 8 insertions, 1 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 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("<w:body xmlns:w='word'/>"), is(new XmlElement("{word}body"))); } + + @Test + public void unmappedNamespaceUrisInAttributeNamesAreIncludedInBracesAsPrefix() { + assertThat( + XmlParser.parseString("<body xmlns:w='word' w:name='bob'></body>"), + is(new XmlElement("body", ImmutableMap.of("{word}name", "bob")))); + } } |
