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