Class XpathAssertions
- java.lang.Object
- org.springframework.test.web.reactive.server.XpathAssertions
public class XpathAssertions extends Object
XPath assertions for theWebTestClient
.- Since:
- 5.1
- Author:
- Eric Deandrea, Rossen Stoyanchev
Method Summary
Method Detail
isEqualTo
public WebTestClient.BodyContentSpec isEqualTo(String expectedValue)
isEqualTo
public WebTestClient.BodyContentSpec isEqualTo(Double expectedValue)
isEqualTo
public WebTestClient.BodyContentSpec isEqualTo(boolean expectedValue)
exists
public WebTestClient.BodyContentSpec exists()
Delegates toXpathExpectationsHelper.exists(byte[], String)
.
doesNotExist
public WebTestClient.BodyContentSpec doesNotExist()
Delegates toXpathExpectationsHelper.doesNotExist(byte[], String)
.
nodeCount
public WebTestClient.BodyContentSpec nodeCount(int expectedCount)
string
public WebTestClient.BodyContentSpec string(Matcher<? super String> matcher)
- Since:
- 5.1
number
public WebTestClient.BodyContentSpec number(Matcher<? super Double> matcher)
- Since:
- 5.1
nodeCount
public WebTestClient.BodyContentSpec nodeCount(Matcher<Integer> matcher)
- Since:
- 5.1
string
public WebTestClient.BodyContentSpec string(Consumer<String> consumer)
Consume the result of the XPath evaluation as a String.- Since:
- 5.1
number
public WebTestClient.BodyContentSpec number(Consumer<Double> consumer)
Consume the result of the XPath evaluation as a Double.- Since:
- 5.1
nodeCount
public WebTestClient.BodyContentSpec nodeCount(Consumer<Integer> consumer)
Consume the count of nodes as result of the XPath evaluation.- Since:
- 5.1