public class HasXPath extends TypeSafeDiagnosingMatcher<org.w3c.dom.Node>
| Constructor and Description |
|---|
HasXPath(java.lang.String xPathExpression,
Matcher<? super java.lang.String> valueMatcher) |
HasXPath(java.lang.String xPathExpression,
javax.xml.namespace.NamespaceContext namespaceContext,
Matcher<? super java.lang.String> valueMatcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(Description description)
Generates a description of the object.
|
static Matcher<org.w3c.dom.Node> |
hasXPath(java.lang.String xPath) |
static Matcher<org.w3c.dom.Node> |
hasXPath(java.lang.String xPath,
Matcher<? super java.lang.String> valueMatcher) |
static Matcher<org.w3c.dom.Node> |
hasXPath(java.lang.String xPath,
javax.xml.namespace.NamespaceContext namespaceContext) |
static Matcher<org.w3c.dom.Node> |
hasXPath(java.lang.String xPath,
javax.xml.namespace.NamespaceContext namespaceContext,
Matcher<? super java.lang.String> valueMatcher) |
boolean |
matchesSafely(org.w3c.dom.Node item,
Description mismatchDescription)
Subclasses should implement this.
|
describeMismatch, matches_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringpublic HasXPath(java.lang.String xPathExpression,
Matcher<? super java.lang.String> valueMatcher)
xPathExpression - XPath expression.valueMatcher - Matcher to use at given XPath.
May be null to specify that the XPath must exist but the value is irrelevant.public HasXPath(java.lang.String xPathExpression,
javax.xml.namespace.NamespaceContext namespaceContext,
Matcher<? super java.lang.String> valueMatcher)
xPathExpression - XPath expression.namespaceContext - Resolves XML namespace prefixes in the XPath expressionvalueMatcher - Matcher to use at given XPath.
May be null to specify that the XPath must exist but the value is irrelevant.public boolean matchesSafely(org.w3c.dom.Node item,
Description mismatchDescription)
TypeSafeDiagnosingMatchermatchesSafely in class TypeSafeDiagnosingMatcher<org.w3c.dom.Node>public void describeTo(Description description)
SelfDescribingdescription - The description to be built or appended to.public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath, Matcher<? super java.lang.String> valueMatcher)
public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath, javax.xml.namespace.NamespaceContext namespaceContext, Matcher<? super java.lang.String> valueMatcher)
public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath)
public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath, javax.xml.namespace.NamespaceContext namespaceContext)