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