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 を評価し、見つかった Boolean SE 値をアサートします。 |
ResultMatcher | doesNotExist() XPath を評価し、コンテンツが存在しないことを表明します。 |
ResultMatcher | exists() XPath を評価し、コンテンツが存在することをアサートします。 |
ResultMatcher | node(Matcher<? super NodeSE> matcher) |
ResultMatcher | nodeCount(int expectedCount) XPath を評価し、見つかったノードの数をアサートします。 |
ResultMatcher | nodeCount(Matcher<? super IntegerSE> matcher) XPath を評価し、指定された Hamcrest Matcher で見つかったノードの数をアサートします。 |
ResultMatcher | nodeList(Matcher<? super NodeListSE> matcher) XPath を評価し、指定された Hamcrest Matcher で見つかった NodeList SE コンテンツをアサートします。 |
ResultMatcher | number(DoubleSE expectedValue) XPath を評価し、見つかった Double SE 値をアサートします。 |
ResultMatcher | number(Matcher<? super DoubleSE> matcher) |
ResultMatcher | string(Matcher<? super StringSE> matcher) |
ResultMatcher | string(StringSE expectedValue) XPath を適用し、見つかった String SE 値をアサートします。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
protected 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 名前空間、または null
args
- String.format(String, Object...)
SE で定義されたフォーマット指定子を使用して XPath 式をパラメーター化する引数 XPathExpressionExceptionSE
public ResultMatcher node(Matcher<? super NodeSE> matcher)
public ResultMatcher nodeList(Matcher<? super NodeListSE> matcher)
Matcher
で見つかった NodeList
SE コンテンツをアサートします。public ResultMatcher exists()
public ResultMatcher doesNotExist()
public ResultMatcher nodeCount(Matcher<? super IntegerSE> matcher)
Matcher
で見つかったノードの数をアサートします。public ResultMatcher nodeCount(int expectedCount)
public ResultMatcher string(Matcher<? super StringSE> matcher)
public ResultMatcher string(StringSE expectedValue)
String
SE 値をアサートします。public ResultMatcher number(Matcher<? super DoubleSE> matcher)
public ResultMatcher number(DoubleSE expectedValue)
Double
SE 値をアサートします。public ResultMatcher booleanValue(BooleanSE value)
Boolean
SE 値をアサートします。