URL Cleanup - polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -50,10 +50,10 @@ public class SimpleNamespaceContextTests {
|
||||
@Test
|
||||
public void getNamespaceURI() {
|
||||
context.bindNamespaceUri(XMLConstants.XMLNS_ATTRIBUTE, additionalNamespaceUri);
|
||||
assertThat("Always returns \"https://www.w3.org/2000/xmlns/\" for \"xmlns\"",
|
||||
assertThat("Always returns \"http://www.w3.org/2000/xmlns/\" for \"xmlns\"",
|
||||
context.getNamespaceURI(XMLConstants.XMLNS_ATTRIBUTE), is(XMLConstants.XMLNS_ATTRIBUTE_NS_URI));
|
||||
context.bindNamespaceUri(XMLConstants.XML_NS_PREFIX, additionalNamespaceUri);
|
||||
assertThat("Always returns \"https://www.w3.org/XML/1998/namespace\" for \"xml\"",
|
||||
assertThat("Always returns \"http://www.w3.org/XML/1998/namespace\" for \"xml\"",
|
||||
context.getNamespaceURI(XMLConstants.XML_NS_PREFIX), is(XMLConstants.XML_NS_URI));
|
||||
|
||||
assertThat("Returns \"\" for an unbound prefix", context.getNamespaceURI(unboundPrefix),
|
||||
@@ -76,9 +76,9 @@ public class SimpleNamespaceContextTests {
|
||||
|
||||
@Test
|
||||
public void getPrefix() {
|
||||
assertThat("Always returns \"xmlns\" for \"https://www.w3.org/2000/xmlns/\"",
|
||||
assertThat("Always returns \"xmlns\" for \"http://www.w3.org/2000/xmlns/\"",
|
||||
context.getPrefix(XMLConstants.XMLNS_ATTRIBUTE_NS_URI), is(XMLConstants.XMLNS_ATTRIBUTE));
|
||||
assertThat("Always returns \"xml\" for \"https://www.w3.org/XML/1998/namespace\"",
|
||||
assertThat("Always returns \"xml\" for \"http://www.w3.org/XML/1998/namespace\"",
|
||||
context.getPrefix(XMLConstants.XML_NS_URI), is(XMLConstants.XML_NS_PREFIX));
|
||||
|
||||
assertThat("Returns null for an unbound namespace URI", context.getPrefix(unboundNamespaceUri),
|
||||
@@ -103,10 +103,10 @@ public class SimpleNamespaceContextTests {
|
||||
|
||||
@Test
|
||||
public void getPrefixes() {
|
||||
assertThat("Returns only \"xmlns\" for \"https://www.w3.org/2000/xmlns/\"",
|
||||
assertThat("Returns only \"xmlns\" for \"http://www.w3.org/2000/xmlns/\"",
|
||||
getItemSet(context.getPrefixes(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)),
|
||||
is(makeSet(XMLConstants.XMLNS_ATTRIBUTE)));
|
||||
assertThat("Returns only \"xml\" for \"https://www.w3.org/XML/1998/namespace\"",
|
||||
assertThat("Returns only \"xml\" for \"http://www.w3.org/XML/1998/namespace\"",
|
||||
getItemSet(context.getPrefixes(XMLConstants.XML_NS_URI)), is(makeSet(XMLConstants.XML_NS_PREFIX)));
|
||||
|
||||
assertThat("Returns empty iterator for unbound prefix", context.getPrefixes("unbound Namespace URI").hasNext(),
|
||||
|
||||
Reference in New Issue
Block a user