org.hamcrest.xml
public class HasXPath extends TypeSafeMatcher<org.w3c.dom.Node>
Constructor and Description |
---|
HasXPath(java.lang.String xPathExpression,
Matcher<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<java.lang.String> valueMatcher) |
boolean |
matchesSafely(org.w3c.dom.Node item)
Subclasses should implement this.
|
matches
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
public HasXPath(java.lang.String xPathExpression, Matcher<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 boolean matchesSafely(org.w3c.dom.Node item)
TypeSafeMatcher
matchesSafely
in class TypeSafeMatcher<org.w3c.dom.Node>
public void describeTo(Description description)
SelfDescribing
description
- The description to be built or appended to.public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath, Matcher<java.lang.String> valueMatcher)
public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath)