public class XpathAssertions
extends java.lang.Object
WebTestClient
.Modifier and Type | Class and Description |
---|---|
private static interface |
XpathAssertions.CheckedExceptionTask
Lets us be able to use lambda expressions that could throw checked exceptions, since
XpathExpectationsHelper throws Exception on its methods. |
Modifier and Type | Field and Description |
---|---|
private WebTestClient.BodyContentSpec |
bodySpec |
private XpathExpectationsHelper |
xpathHelper |
Constructor and Description |
---|
XpathAssertions(WebTestClient.BodyContentSpec spec,
java.lang.String expression,
java.util.Map<java.lang.String,java.lang.String> namespaces,
java.lang.Object... args) |
Modifier and Type | Method and Description |
---|---|
private WebTestClient.BodyContentSpec |
assertWith(XpathAssertions.CheckedExceptionTask task) |
WebTestClient.BodyContentSpec |
doesNotExist()
Delegates to
XpathExpectationsHelper.doesNotExist(byte[], String) . |
boolean |
equals(java.lang.Object obj) |
WebTestClient.BodyContentSpec |
exists()
Delegates to
XpathExpectationsHelper.exists(byte[], String) . |
private java.lang.String |
getCharset() |
private byte[] |
getContent() |
int |
hashCode() |
private static XpathExpectationsHelper |
initXpathHelper(java.lang.String expression,
java.util.Map<java.lang.String,java.lang.String> namespaces,
java.lang.Object[] args) |
WebTestClient.BodyContentSpec |
isEqualTo(boolean expectedValue)
|
WebTestClient.BodyContentSpec |
isEqualTo(java.lang.Double expectedValue)
Delegates to
XpathExpectationsHelper#assertNumber(byte[], String, Double) . |
WebTestClient.BodyContentSpec |
isEqualTo(java.lang.String expectedValue)
Delegates to
XpathExpectationsHelper#assertString(byte[], String, String) . |
WebTestClient.BodyContentSpec |
nodeCount(<any> matcher)
Delegates to
XpathExpectationsHelper#assertNodeCount(byte[], String, Matcher) . |
WebTestClient.BodyContentSpec |
nodeCount(int expectedCount)
Delegates to
XpathExpectationsHelper#assertNodeCount(byte[], String, int) . |
WebTestClient.BodyContentSpec |
number(<any> matcher)
Delegates to
XpathExpectationsHelper#assertNumber(byte[], String, Matcher) . |
WebTestClient.BodyContentSpec |
string(<any> matcher)
Delegates to
XpathExpectationsHelper#assertString(byte[], String, Matcher) . |
private final WebTestClient.BodyContentSpec bodySpec
private final XpathExpectationsHelper xpathHelper
XpathAssertions(WebTestClient.BodyContentSpec spec, java.lang.String expression, @Nullable java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.Object... args)
private static XpathExpectationsHelper initXpathHelper(java.lang.String expression, @Nullable java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.Object[] args)
public WebTestClient.BodyContentSpec isEqualTo(java.lang.String expectedValue)
XpathExpectationsHelper#assertString(byte[], String, String)
.public WebTestClient.BodyContentSpec isEqualTo(java.lang.Double expectedValue)
XpathExpectationsHelper#assertNumber(byte[], String, Double)
.public WebTestClient.BodyContentSpec isEqualTo(boolean expectedValue)
public WebTestClient.BodyContentSpec exists()
XpathExpectationsHelper.exists(byte[], String)
.public WebTestClient.BodyContentSpec doesNotExist()
XpathExpectationsHelper.doesNotExist(byte[], String)
.public WebTestClient.BodyContentSpec nodeCount(int expectedCount)
XpathExpectationsHelper#assertNodeCount(byte[], String, int)
.public WebTestClient.BodyContentSpec string(<any> matcher)
XpathExpectationsHelper#assertString(byte[], String, Matcher)
.public WebTestClient.BodyContentSpec number(<any> matcher)
XpathExpectationsHelper#assertNumber(byte[], String, Matcher)
.public WebTestClient.BodyContentSpec nodeCount(<any> matcher)
XpathExpectationsHelper#assertNodeCount(byte[], String, Matcher)
.private WebTestClient.BodyContentSpec assertWith(XpathAssertions.CheckedExceptionTask task)
private byte[] getContent()
private java.lang.String getCharset()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object