public class XpathResultMatchers extends ObjectSE
このクラスのインスタンスは通常、MockMvcResultMatchers.xpath(java.lang.String, java.lang.Object...) を介してアクセスされます。
| 修飾子 | コンストラクターと説明 |
|---|---|
protected | XpathResultMatchers(StringSE expression, MapSE<StringSE, StringSE> namespaces, ObjectSE... args) 直接インスタンス化用ではなく、protected コンストラクター。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
ResultMatcher | booleanValue(BooleanSE value)XPath を評価し、見つかった BooleanSE 値をアサートします。 |
ResultMatcher | doesNotExist()XPath を評価し、コンテンツが存在しないことを表明します。 |
ResultMatcher | exists()XPath を評価し、コンテンツが存在することをアサートします。 |
ResultMatcher | node(Matcher<? super NodeSE> matcher) |
ResultMatcher | nodeCount(int expectedCount)XPath を評価し、見つかったノードの数をアサートします。 |
ResultMatcher | nodeCount(Matcher<IntegerSE> matcher)XPath を評価し、指定された Hamcrest Matcher で見つかったノードの数をアサートします。 |
ResultMatcher | nodeList(Matcher<? super NodeListSE> matcher)XPath を評価し、指定された Hamcrest Matcher で見つかった NodeListSE コンテンツをアサートします。 |
ResultMatcher | number(DoubleSE expectedValue)XPath を評価し、見つかった DoubleSE 値をアサートします。 |
ResultMatcher | number(Matcher<? super DoubleSE> matcher) |
ResultMatcher | string(Matcher<? super StringSE> matcher) |
ResultMatcher | string(StringSE expectedValue)XPath を適用し、見つかった StringSE 値をアサートします。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEprotected XpathResultMatchers(StringSE expression, @Nullable MapSE<StringSE,StringSE> namespaces, ObjectSE... args) throws XPathExpressionExceptionSE
MockMvcResultMatchers.xpath(String, Object...) または MockMvcResultMatchers.xpath(String, Map, Object...) を使用します。expression - XPath 式 namespaces - XPath 式で参照される XML 名前空間、または nullargs - String.format(String, Object...)SE で定義されたフォーマット指定子を使用して XPath 式をパラメーター化する引数 XPathExpressionExceptionSEpublic ResultMatcher node(Matcher<? super NodeSE> matcher)
public ResultMatcher nodeList(Matcher<? super NodeListSE> matcher)
Matcher で見つかった NodeListSE コンテンツをアサートします。public ResultMatcher exists()
public ResultMatcher doesNotExist()
public ResultMatcher nodeCount(Matcher<IntegerSE> matcher)
Matcher で見つかったノードの数をアサートします。public ResultMatcher nodeCount(int expectedCount)
public ResultMatcher string(Matcher<? super StringSE> matcher)
public ResultMatcher string(StringSE expectedValue)
StringSE 値をアサートします。public ResultMatcher number(Matcher<? super DoubleSE> matcher)
public ResultMatcher number(DoubleSE expectedValue)
DoubleSE 値をアサートします。public ResultMatcher booleanValue(BooleanSE value)
BooleanSE 値をアサートします。