public class XpathRequestMatchers
extends java.lang.ObjectRequestMatcher をリクエストするためのファクトリメソッド。このクラスのインスタンスには、通常、RequestMatchers.xpath(..) を介してアクセスします。| 修飾子 | コンストラクターと説明 |
|---|---|
protected | XpathRequestMatchers(java.lang.String expression, java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.Object... args) 直接インスタンス化用ではなく、クラスコンストラクター。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
<T> RequestMatcher | booleanValue(java.lang.Boolean value)XPath を適用し、見つかったブール値をアサートします。 |
<T> RequestMatcher | doesNotExist() 指定された XPath にコンテンツが存在しないことを表明します。 |
<T> RequestMatcher | exists() コンテンツが指定された XPath に存在することを表明します。 |
<T> RequestMatcher | node(org.hamcrest.Matcher<? super org.w3c.dom.Node> matcher)XPath を適用し、指定された Matcher<Node> でそれをアサートします。 |
<T> RequestMatcher | nodeCount(int expectedCount)XPath を適用し、見つかったノードの数をアサートします。 |
<T> RequestMatcher | nodeCount(org.hamcrest.Matcher<java.lang.Integer> matcher)XPath を適用し、指定された Matcher<Integer> で見つかったノードの数をアサートします。 |
RequestMatcher | number(java.lang.Double value)XPath を適用し、見つかったノードの数をアサートします。 |
<T> RequestMatcher | number(org.hamcrest.Matcher<? super java.lang.Double> matcher)XPath を適用し、指定されたマッチャーで見つかった数をアサートします。 |
<T> RequestMatcher | string(org.hamcrest.Matcher<? super java.lang.String> matcher)XPath を適用し、指定されたマッチャーで見つかった String コンテンツをアサートします。 |
RequestMatcher | string(java.lang.String value)XPath を適用し、見つかった文字列コンテンツをアサートします。 |
protected XpathRequestMatchers(java.lang.String expression,
@Nullable
java.util.Map<java.lang.String,java.lang.String> namespaces,
java.lang.Object... args)
throws javax.xml.xpath.XPathExpressionExceptionMockRestRequestMatchers.xpath(String, Object...) または MockRestRequestMatchers.xpath(String, Map, Object...) を使用します。expression - XPath 式 namespaces - XPath 式で参照される XML 名前空間、または nullargs - String.format(String, Object...) で定義されたフォーマット指定子を使用して XPath 式をパラメーター化する引数 javax.xml.xpath.XPathExpressionException - 式のコンパイルが失敗した場合 public <T> RequestMatcher node(org.hamcrest.Matcher<? super org.w3c.dom.Node> matcher)
Matcher<Node> でそれをアサートします。public <T> RequestMatcher exists()
public <T> RequestMatcher doesNotExist()
public <T> RequestMatcher nodeCount(org.hamcrest.Matcher<java.lang.Integer> matcher)
Matcher<Integer> で見つかったノードの数をアサートします。public <T> RequestMatcher nodeCount(int expectedCount)
public <T> RequestMatcher string(org.hamcrest.Matcher<? super java.lang.String> matcher)
public RequestMatcher string(java.lang.String value)
public <T> RequestMatcher number(org.hamcrest.Matcher<? super java.lang.Double> matcher)
public RequestMatcher number(java.lang.Double value)
public <T> RequestMatcher booleanValue(java.lang.Boolean value)