open class XpathResultMatchers
Factory for assertions on the response content using XPath expressions.
An instance of this class is typically accessed via MockMvcResultMatchers#xpath.
Author
Rossen Stoyanchev
Since
3.2
open fun booleanValue(value: Boolean): ResultMatcher
Evaluate the XPath and assert the Boolean value found. |
|
open fun doesNotExist(): ResultMatcher
Evaluate the XPath and assert that content doesn't exist. |
|
open fun exists(): ResultMatcher
Evaluate the XPath and assert that content exists. |
|
open fun node(matcher: Matcher<in Node>): ResultMatcher
Evaluate the XPath and assert the Node content found with the given Hamcrest Matcher. |
|
open fun nodeCount(matcher: Matcher<Int>): ResultMatcher
Evaluate the XPath and assert the number of nodes found with the given Hamcrest Matcher. open fun nodeCount(expectedCount: Int): ResultMatcher
Evaluate the XPath and assert the number of nodes found. |
|
open fun number(matcher: Matcher<in Double>): ResultMatcher
Evaluate the XPath and assert the Double value found with the given Hamcrest Matcher. open fun number(expectedValue: Double): ResultMatcher
Evaluate the XPath and assert the Double value found. |
|
open fun string(matcher: Matcher<in String>): ResultMatcher
Apply the XPath and assert the String value found with the given Hamcrest Matcher. open fun string(expectedValue: String): ResultMatcher
Apply the XPath and assert the String value found. |