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