Class AbstractXpathAssertions<B>
java.lang.Object
org.springframework.test.web.support.AbstractXpathAssertions<B>
- Type Parameters:
B
- the type of body spec (RestTestClient vs WebTestClient specific)
- Direct Known Subclasses:
XpathAssertions, XpathAssertions
Base class for applying XPath assertions in RestTestClient and WebTestClient.
- Since:
- 7.0
- Author:
- Rob Worsnop, Rossen Stoyanchev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDelegates toXpathExpectationsHelper.doesNotExist(byte[], String)
.boolean
exists()
Delegates toXpathExpectationsHelper.exists(byte[], String)
.protected B
Return the body spec.protected abstract byte[]
Subclasses must implement this to provide access to the response content.protected abstract Optional
<HttpHeaders> Subclasses must implement this to provide access to response headers.int
hashCode()
isEqualTo
(boolean expectedValue) nodeCount
(int expectedCount) Consume the count of nodes as result of the XPath evaluation.Consume the result of the XPath evaluation as a Double.Consume the result of the XPath evaluation as a String.
-
Constructor Details
-
AbstractXpathAssertions
-
-
Method Details
-
getBodySpec
Return the body spec. -
getResponseHeaders
Subclasses must implement this to provide access to response headers. -
getContent
protected abstract byte[] getContent()Subclasses must implement this to provide access to the response content. -
isEqualTo
-
isEqualTo
-
isEqualTo
-
exists
Delegates toXpathExpectationsHelper.exists(byte[], String)
. -
doesNotExist
Delegates toXpathExpectationsHelper.doesNotExist(byte[], String)
. -
nodeCount
-
string
-
number
-
nodeCount
-
string
-
number
-
nodeCount
-
equals
-
hashCode
-