Package org.geotools.test.xml
Class XmlTestSupport
Object
XmlTestSupport
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSimple tuple for holding a namespace. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DiffdiffSimilar(Object expected, Object actual) Get the namespaces needed for this test class.protected EvaluateXPathMatcherSimply a wrapper aroundEvaluateXPathMatcher.hasXPath(String, Matcher)that sets the namespaces here, so that by omitting them from the assertions used in the tests, those assertions are more compact and hopefully more readable.static XmlTestSupport.NamespaceConstruct a Namespace.namespaces(XmlTestSupport.Namespace... namespaces) Construct a Map of Namespace(s).
-
Constructor Details
-
XmlTestSupport
public XmlTestSupport()
-
-
Method Details
-
getNamespaces
Get the namespaces needed for this test class.- Returns:
- the namespaces needed for this test class.
-
Namespace
Construct a Namespace. Just a shortcut fornew Namespace(String, String).- Parameters:
prefix- the namespace prefix.uri- the namespace URI.- Returns:
- the Namespace.
-
namespaces
Construct a Map of Namespace(s).- Parameters:
namespaces- the namespaces.- Returns:
- a namespaces map.
-
hasXPath
Simply a wrapper aroundEvaluateXPathMatcher.hasXPath(String, Matcher)that sets the namespaces here, so that by omitting them from the assertions used in the tests, those assertions are more compact and hopefully more readable.- Parameters:
xPath- the xpath to evaluatevalueMatcher- the result of the xpath evaluation to match- Returns:
- an XPath Matcher
-
diffSimilar
-