Interface ResponseXPathExpectations


public interface ResponseXPathExpectations
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 Details

    • exists

      ResponseMatcher exists()
      Expects the XPath expression to exist.
      Returns:
      the request matcher
    • doesNotExist

      ResponseMatcher doesNotExist()
      Expects the XPath expression to not exist.
      Returns:
      the request matcher
    • evaluatesTo

      ResponseMatcher evaluatesTo(boolean expectedValue)
      Expects the XPath expression to evaluate to the given boolean.
      Parameters:
      expectedValue - the expected value
      Returns:
      the request matcher
    • evaluatesTo

      ResponseMatcher evaluatesTo(int expectedValue)
      Expects the XPath expression to evaluate to the given integer.
      Parameters:
      expectedValue - the expected value
      Returns:
      the request matcher
    • evaluatesTo

      ResponseMatcher evaluatesTo(double expectedValue)
      Expects the XPath expression to evaluate to the given double.
      Parameters:
      expectedValue - the expected value
      Returns:
      the request matcher
    • evaluatesTo

      ResponseMatcher evaluatesTo(String expectedValue)
      Expects the XPath expression to evaluate to the given string.
      Parameters:
      expectedValue - the expected value
      Returns:
      the request matcher