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 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

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

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

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

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