public class QueryStringRequestMatcher extends RequestMatcher<String>
RequestMatcher
used for matching the request query string.pred
Modifier | Constructor and Description |
---|---|
protected |
QueryStringRequestMatcher(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 QueryStringRequestMatcher |
requestQueryString(org.hamcrest.Matcher<? super String> pred)
Factory method to create new instance of this matcher.
|
String |
retrieveValue(Request req)
Retrieves the query string value of the given request.
|
describeMismatch, describeTo, matches
protected QueryStringRequestMatcher(org.hamcrest.Matcher<? super String> pred)
requestQueryString(org.hamcrest.Matcher)
instead.pred
- a predicate to be applied on the query stringpublic String retrieveValue(Request req)
retrieveValue
in class RequestMatcher<String>
req
- request to retrieve the query string fromnull
for requests without a query string part (no ? character)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 QueryStringRequestMatcher requestQueryString(org.hamcrest.Matcher<? super String> pred)
pred
- a predicate to be applied on the request query stringCopyright © 2016. All Rights Reserved.