public class HttpClientVerifyBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
called()
Verifies if there was exactly one request matching defined conditions.
|
void |
called(int numberOfCalls)
Verifies number of request matching defined conditions.
|
void |
called(org.hamcrest.Matcher<Integer> numberOfCalls)
Verifies number of request matching defined conditions.
|
void |
notCalled()
Verifies if there were no request matching defined conditions.
|
HttpClientVerifyBuilder |
with(Condition condition)
Adds custom conditions.
|
HttpClientVerifyBuilder |
withBody(org.hamcrest.Matcher<String> matcher)
Adds body condition.
|
HttpClientVerifyBuilder |
withExtraFormParameters()
Allows extra parameters (not defined in condition) in form.
|
HttpClientVerifyBuilder |
withExtraParameters()
Allows extra parameters (not defined in condition) in query.
|
HttpClientVerifyBuilder |
withFormParameter(String name,
org.hamcrest.Matcher<String> matcher)
Request body must contain the given URL-encoded form parameter (typically found in POST requests).
|
HttpClientVerifyBuilder |
withFormParameter(String name,
String value)
Request body must contain the given URL-encoded form parameter (typically found in POST requests).
|
HttpClientVerifyBuilder |
withFormParameters(ParametersMatcher parameters)
Request body must contain the given URL-encoded form parameters (typically used in POST requests).
|
HttpClientVerifyBuilder |
withHeader(String header,
org.hamcrest.Matcher<String> matcher)
Adds header condition.
|
HttpClientVerifyBuilder |
withHeader(String header,
String value)
Adds header condition.
|
HttpClientVerifyBuilder |
withHost(String host)
Adds host condition.
|
HttpClientVerifyBuilder |
withoutExtraFormParameters()
Disallows extra parameters (not defined in condition) in form.
|
HttpClientVerifyBuilder |
withoutExtraParameters()
Disallows extra parameters (not defined in condition) in query.
|
HttpClientVerifyBuilder |
withParameter(String name,
org.hamcrest.Matcher<String> matcher)
Adds parameter condition.
|
HttpClientVerifyBuilder |
withParameter(String name,
String value)
Adds parameter condition.
|
HttpClientVerifyBuilder |
withPath(org.hamcrest.Matcher<String> matcher)
Adds path condition.
|
HttpClientVerifyBuilder |
withPath(String path)
Adds path condition.
|
HttpClientVerifyBuilder |
withReference(org.hamcrest.Matcher<String> matcher)
Adds reference condition.
|
HttpClientVerifyBuilder |
withReference(String reference)
Adds reference condition.
|
public HttpClientVerifyBuilder withHeader(String header, String value)
header - header namevalue - expected valuepublic HttpClientVerifyBuilder withHeader(String header, org.hamcrest.Matcher<String> matcher)
header - header namematcher - header value matcherpublic HttpClientVerifyBuilder withReference(String reference)
reference - expected referencepublic HttpClientVerifyBuilder withReference(org.hamcrest.Matcher<String> matcher)
matcher - reference matcherpublic HttpClientVerifyBuilder withParameter(String name, String value)
name - parameter namevalue - expected parameter valuepublic HttpClientVerifyBuilder withParameter(String name, org.hamcrest.Matcher<String> matcher)
name - parameter namematcher - parameter value matcherpublic HttpClientVerifyBuilder withFormParameter(String name, String value)
withFormParameters(ParametersMatcher).name - parameter namevalue - expected parameter valuepublic HttpClientVerifyBuilder withFormParameter(String name, org.hamcrest.Matcher<String> matcher)
withFormParameters(ParametersMatcher).name - parameter namematcher - parameter value matcherpublic HttpClientVerifyBuilder withFormParameters(ParametersMatcher parameters)
withFormParameter(String, Matcher).parameters - the parameterspublic HttpClientVerifyBuilder with(Condition condition)
condition - custom conditionpublic HttpClientVerifyBuilder withBody(org.hamcrest.Matcher<String> matcher)
matcher - custom conditionpublic HttpClientVerifyBuilder withHost(String host)
host - expected hostpublic HttpClientVerifyBuilder withPath(String path)
path - expected pathpublic HttpClientVerifyBuilder withPath(org.hamcrest.Matcher<String> matcher)
matcher - path matcherpublic HttpClientVerifyBuilder withExtraParameters()
public HttpClientVerifyBuilder withoutExtraParameters()
public HttpClientVerifyBuilder withExtraFormParameters()
public HttpClientVerifyBuilder withoutExtraFormParameters()
public void notCalled()
public void called()
public void called(int numberOfCalls)
numberOfCalls - expected number of callspublic void called(org.hamcrest.Matcher<Integer> numberOfCalls)
numberOfCalls - expected number of callsCopyright © 2020. All rights reserved.