Uses of Interface
kong.unirest.core.ExpectedResponse
Packages that use ExpectedResponse
-
Uses of ExpectedResponse in kong.unirest.core
Classes in kong.unirest.core that implement ExpectedResponseFields in kong.unirest.core with type parameters of type ExpectedResponseModifier and TypeFieldDescriptionprivate Function
<HttpRequest<?>, ExpectedResponse> Invocation.functionalResponse
Methods in kong.unirest.core that return ExpectedResponseModifier and TypeMethodDescriptionMockClient.defaultResponse()
return this status for any request that doesn't match a expectationstatic ExpectedResponse
ExpectedResponse.of
(int status) Create a independent expected response.Expectation.thenReturn()
expect a null responseExpectation.thenReturn
(Object pojo) expect a object response as defined by a pojo using the requests / configuration object mapperExpectation.thenReturn
(String body) expect a string responseExpectation.thenReturn
(Supplier<String> supplier) A supplier for the expected body which will get invoked at the time of build the response.Expectation.thenReturn
(JSONElement jsonObject) expect a json responseExpectedResponse.thenReturn
(Object pojo) expect a object response as defined by a pojo using the requests / configuration object mapperExpectedResponse.thenReturn
(String body) expect a string responseExpectedResponse.thenReturn
(Supplier<String> supplier) A supplier for the expected body which will get invoked at the time of build the response.ExpectedResponse.thenReturn
(JSONElement jsonObject) expect a json responseExpectedResponseRecord.thenReturn
(Object pojo) ExpectedResponseRecord.thenReturn
(String body) ExpectedResponseRecord.thenReturn
(Supplier<String> supplier) ExpectedResponseRecord.thenReturn
(JSONElement jsonObject) private ExpectedResponse
ExpectedResponseRecord.thenReturn
(MockResponse res) Invocation.thenReturn()
Invocation.thenReturn
(Object pojo) Invocation.thenReturn
(String body) Invocation.thenReturn
(Supplier<String> supplier) Invocation.thenReturn
(JSONElement jsonObject) ExpectedResponse.withHeader
(String key, String value) adds a header to the expected responseExpectedResponseRecord.withHeader
(String key, String value) ExpectedResponse.withHeaders
(Headers headers) adds a collection of headers to the expected responseExpectedResponseRecord.withHeaders
(Headers value) ExpectedResponse.withStatus
(int httpStatus) sets the status of the expected responseExpectedResponse.withStatus
(int httpStatus, String statusMessage) sets the status of the expected responseExpectedResponseRecord.withStatus
(int httpStatus) ExpectedResponseRecord.withStatus
(int httpStatus, String statusMessage) Method parameters in kong.unirest.core with type arguments of type ExpectedResponseModifier and TypeMethodDescriptionvoid
Expectation.thenReturn
(Function<HttpRequest<?>, ExpectedResponse> fun) Allows for a full override of the way a expected response is built.void
Invocation.thenReturn
(Function<HttpRequest<?>, ExpectedResponse> fun)