Interface RequestXPathExpectations
public interface RequestXPathExpectations
Allows for setting up expectations on XPath expressions.
Implementations of this interface are returned by RequestMatchers.xpath(String)
and
RequestMatchers.xpath(String, java.util.Map)
, as part of the fluent API. As such, it is not typical to
implement this interface yourself.
- Since:
- 2.0
- Author:
- Lukas Krecan, Arjen Poutsma
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionExpects the XPath expression to not exist.evaluatesTo
(boolean expectedValue) Expects the XPath expression to evaluate to the given boolean.evaluatesTo
(double expectedValue) Expects the XPath expression to evaluate to the given double.evaluatesTo
(int expectedValue) Expects the XPath expression to evaluate to the given integer.evaluatesTo
(String expectedValue) Expects the XPath expression to evaluate to the given string.exists()
Expects the XPath expression to exist.
-
Method Details
-
exists
RequestMatcher exists()Expects the XPath expression to exist.- Returns:
- the request matcher
-
doesNotExist
RequestMatcher doesNotExist()Expects the XPath expression to not exist.- Returns:
- the request matcher
-
evaluatesTo
Expects the XPath expression to evaluate to the given boolean.- Parameters:
expectedValue
- the expected value- Returns:
- the request matcher
-
evaluatesTo
Expects the XPath expression to evaluate to the given integer.- Parameters:
expectedValue
- the expected value- Returns:
- the request matcher
-
evaluatesTo
Expects the XPath expression to evaluate to the given double.- Parameters:
expectedValue
- the expected value- Returns:
- the request matcher
-
evaluatesTo
Expects the XPath expression to evaluate to the given string.- Parameters:
expectedValue
- the expected value- Returns:
- the request matcher
-