public class BodyRequestMatcher extends RequestMatcher<String>
RequestMatcher used for matching the request body as a string.pred| Modifier | Constructor and Description |
|---|---|
protected |
BodyRequestMatcher(org.hamcrest.Matcher<? super String> pred)
Protected constructor useful only when subtyping.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
provideDescription()
Provides a description of this matcher in form of a string consisting of "noun verb", where
noun describes the value retrieved using
RequestMatcher.retrieveValue(net.jadler.Request) and verb is usually a correct
form of to be. |
static BodyRequestMatcher |
requestBody(org.hamcrest.Matcher<? super String> pred)
Factory method to create new instance of this matcher.
|
protected String |
retrieveValue(Request req)
Retrieves the body of the given request
|
describeMismatch, describeTo, matchesprotected BodyRequestMatcher(org.hamcrest.Matcher<? super String> pred)
requestBody(org.hamcrest.Matcher) instead.pred - a predicate to be applied on the request bodyprotected String retrieveValue(Request req)
retrieveValue in class RequestMatcher<String>req - request to retrieve the body fromnull)protected String provideDescription()
Provides a description of this matcher in form of a string consisting of "noun verb", where
noun describes the value retrieved using RequestMatcher.retrieveValue(net.jadler.Request) and verb is usually a correct
form of to be.
If the RequestMatcher.retrieveValue(net.jadler.Request) provided a request method, this method would return
method is string for example.
provideDescription in class RequestMatcher<String>public static BodyRequestMatcher requestBody(org.hamcrest.Matcher<? super String> pred)
pred - a predicate to be applied on the request bodyCopyright © 2016. All Rights Reserved.