类 XpathRequestMatchers
java.lang.Object
cn.taketoday.test.web.client.match.XpathRequestMatchers
Factory methods for request content
RequestMatcher implementations
that use an XPath expression.
An instance of this class is typically accessed via
MockRestRequestMatchers.xpath(String, Object...) or
MockRestRequestMatchers.xpath(String, Map, Object...).
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Sam Brannen
-
嵌套类概要
嵌套类 -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanValue(Boolean value) Apply the XPath and assert the boolean value found.Assert that content does not exist at the given XPath.exists()Assert that content exists at the given XPath.Apply the XPath and assert it with the givenMatcher<Node>.nodeCount(int expectedCount) Apply the XPath and assert the number of nodes found.Apply the XPath and assert the number of nodes found with the givenMatcher<Integer>.Apply the XPath and assert the number value found.Apply the XPath and assert the number found with the given matcher.Apply the XPath and assert the String content found.Apply the XPath and assert the String content found with the given matcher.
-
字段详细资料
-
DEFAULT_ENCODING
- 另请参阅:
-
xpathHelper
-
-
构造器详细资料
-
XpathRequestMatchers
protected XpathRequestMatchers(String expression, @Nullable Map<String, String> namespaces, Object... args) throws XPathExpressionExceptionClass constructor, not for direct instantiation.Use
MockRestRequestMatchers.xpath(String, Object...)orMockRestRequestMatchers.xpath(String, Map, Object...).- 参数:
expression- the XPath expressionnamespaces- the XML namespaces referenced in the XPath expression, ornullargs- arguments to parameterize the XPath expression with, using the formatting specifiers defined inString.format(String, Object...)- 抛出:
XPathExpressionException- if expression compilation failed
-
-
方法详细资料
-
node
Apply the XPath and assert it with the givenMatcher<Node>. -
exists
Assert that content exists at the given XPath. -
doesNotExist
Assert that content does not exist at the given XPath. -
nodeCount
Apply the XPath and assert the number of nodes found with the givenMatcher<Integer>. -
nodeCount
Apply the XPath and assert the number of nodes found. -
string
Apply the XPath and assert the String content found with the given matcher. -
string
Apply the XPath and assert the String content found. -
number
Apply the XPath and assert the number found with the given matcher. -
number
Apply the XPath and assert the number value found. -
booleanValue
Apply the XPath and assert the boolean value found.
-