public interface Expectation
| Modifier and Type | Method and Description |
|---|---|
Expectation |
body(BodyMatcher matcher)
A matcher for the body for a request
|
Expectation |
body(String body)
A expected body for a request
|
Expectation |
header(String key,
String value)
A expected header for a request
|
Expectation |
queryString(String key,
String value)
A expected header for a request
|
ExpectedResponse |
thenReturn()
expect a null response
|
ExpectedResponse |
thenReturn(JSONElement jsonObject)
expect a json response
|
ExpectedResponse |
thenReturn(Object pojo)
expect a object response as defined by a pojo using the requests / configuration object mapper
|
ExpectedResponse |
thenReturn(String body)
expect a string response
|
Expectation header(String key, String value)
key - the header keyvalue - the header valueExpectation queryString(String key, String value)
key - the query keyvalue - the query valueExpectation body(String body)
body - the expected bodyExpectation body(BodyMatcher matcher)
matcher - the matcherExpectedResponse thenReturn()
ExpectedResponse thenReturn(String body)
body - the expected response bodyExpectedResponse thenReturn(JSONElement jsonObject)
jsonObject - the expected response bodyExpectedResponse thenReturn(Object pojo)
pojo - the expected response bodyCopyright © 2021. All rights reserved.