public class PathRequestMatcher extends RequestMatcher<String>
RequestMatcher
used for matching the request path.pred
Modifier | Constructor and Description |
---|---|
protected |
PathRequestMatcher(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 PathRequestMatcher |
requestPath(org.hamcrest.Matcher<? super String> pred)
Factory method to create new instance of this matcher.
|
String |
retrieveValue(Request req)
Retrieves the path of the given request.
|
describeMismatch, describeTo, matches
protected PathRequestMatcher(org.hamcrest.Matcher<? super String> pred)
requestPath(org.hamcrest.Matcher)
instead.pred
- a predicate to be applied on the request pathpublic String retrieveValue(Request req)
retrieveValue
in class RequestMatcher<String>
req
- request to retrieve the path 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 PathRequestMatcher requestPath(org.hamcrest.Matcher<? super String> pred)
pred
- a predicate to be applied on the request pathCopyright © 2016. All Rights Reserved.