Skip navigation links
A B C E F G H I K M O Q R T U V W 

A

Assert - Interface in kong.unirest
a set of assertable things about the requests that the mock client handled.
assertHeader(String, String) - Method in interface kong.unirest.Assert
Assert that any request to this method/path contained this header
assertInvokedTimes(int) - Method in interface kong.unirest.Assert
assert that this instance of method/path was invoked x times
assertThat(HttpMethod, String) - Method in class kong.unirest.MockClient
Assert a specific method and path were invoked

B

body(String) - Method in interface kong.unirest.Expectation
A expected body for a request
body(BodyMatcher) - Method in interface kong.unirest.Expectation
A matcher for the body for a request
bodyFields(String) - Method in class kong.unirest.Matchers
Creates a FieldMatcher expecting a map of keys and values use like: FieldMatcher.of("fruit", "orange", "quantity" "42")
BodyMatcher - Interface in kong.unirest
Body Matchers can be used to evaluate a entity body.
BodySummary - Interface in kong.unirest
 

C

clear() - Static method in class kong.unirest.MockClient
Clears any MockClient from the primary instance
clear(UnirestInstance) - Static method in class kong.unirest.MockClient
Clears any MockClient from the instance
close() - Method in class kong.unirest.MockClient
 

E

EqualsBodyMatcher - Class in kong.unirest
 
EqualsBodyMatcher(String) - Constructor for class kong.unirest.EqualsBodyMatcher
 
expect(HttpMethod, String) - Method in class kong.unirest.MockClient
Start an expectation chain.
expect(HttpMethod) - Method in class kong.unirest.MockClient
Expect ANY call to a path with this method
Expectation - Interface in kong.unirest
A expectation for a particular method/path
ExpectedResponse - Interface in kong.unirest
 

F

FieldMatcher - Class in kong.unirest
Matches simple form fields
FieldMatcher(Map<String, String>) - Constructor for class kong.unirest.FieldMatcher
Creates a FieldMatcher expecting a map of keys and values

G

getClient() - Method in class kong.unirest.MockClient
 
getConfig() - Method in class kong.unirest.MockRawResponse
 
getContent() - Method in class kong.unirest.MockRawResponse
 
getContentAsBytes() - Method in class kong.unirest.MockRawResponse
 
getContentAsString() - Method in class kong.unirest.MockRawResponse
 
getContentAsString(String) - Method in class kong.unirest.MockRawResponse
 
getContentReader() - Method in class kong.unirest.MockRawResponse
 
getContentType() - Method in class kong.unirest.MockRawResponse
 
getDescription() - Method in class kong.unirest.MatchStatus
 
getEncoding() - Method in class kong.unirest.MockRawResponse
 
getHeaders() - Method in class kong.unirest.MockRawResponse
 
getStatus() - Method in class kong.unirest.MockRawResponse
 
getStatusText() - Method in class kong.unirest.MockRawResponse
 

H

hasContent() - Method in class kong.unirest.MockRawResponse
 
header(String, String) - Method in interface kong.unirest.Expectation
A expected header for a request

I

isSuccess() - Method in class kong.unirest.MatchStatus
 

K

kong.unirest - package kong.unirest
 

M

Matchers - Class in kong.unirest
Static set of Matchers
Matchers() - Constructor for class kong.unirest.Matchers
 
matches(List<String>) - Method in interface kong.unirest.BodyMatcher
indicates if the Matcher succeeded in matching the body
matches(List<String>) - Method in class kong.unirest.EqualsBodyMatcher
 
matches(List<String>) - Method in class kong.unirest.FieldMatcher
 
MatchStatus - Class in kong.unirest
Indicates a successful match and a description of the failure (if any)
MatchStatus(boolean, String) - Constructor for class kong.unirest.MatchStatus
Contruct a Match status
MockClient - Class in kong.unirest
A Mock client for unirest to make requests against This implements both sync and async clients
MockClient(Supplier<Config>) - Constructor for class kong.unirest.MockClient
 
MockRawResponse - Class in kong.unirest
 
MockRawResponse(String, Headers, int, String, Config) - Constructor for class kong.unirest.MockRawResponse
 

O

of(String...) - Static method in class kong.unirest.FieldMatcher
Creates a FieldMatcher expecting a map of keys and values use like: FieldMatcher.of("fruit", "orange", "quantity" "42")

Q

queryString(String, String) - Method in interface kong.unirest.Expectation
A expected header for a request

R

register() - Static method in class kong.unirest.MockClient
Creates a new MockClient and registers it on the primary static UnirestInstance
register(UnirestInstance) - Static method in class kong.unirest.MockClient
Creates a new MockClient and registers it on the Unirest instance
registerShutdownHook() - Method in class kong.unirest.MockClient
 
request(HttpRequest, Function<RawResponse, HttpResponse<T>>) - Method in class kong.unirest.MockClient
 
request(HttpRequest, Function<RawResponse, HttpResponse<T>>, CompletableFuture<HttpResponse<T>>) - Method in class kong.unirest.MockClient
 

T

thenReturn() - Method in interface kong.unirest.Expectation
expect a null response
thenReturn(String) - Method in interface kong.unirest.Expectation
expect a string response
thenReturn(JSONElement) - Method in interface kong.unirest.Expectation
expect a json response
thenReturn(Object) - Method in interface kong.unirest.Expectation
expect a object response as defined by a pojo using the requests / configuration object mapper
toSummary() - Method in class kong.unirest.MockRawResponse
 

U

UnirestAssertion - Error in kong.unirest
Thrown to indicate that an assertion has failed.
UnirestAssertion(String, Object...) - Constructor for error kong.unirest.UnirestAssertion
 

V

verifyAll() - Method in interface kong.unirest.Assert
verify that all Expectations were fulfilled at least once.
verifyAll() - Method in class kong.unirest.MockClient
Verify that all Expectations were invoked

W

withHeader(String, String) - Method in interface kong.unirest.ExpectedResponse
 
withStatus(int) - Method in interface kong.unirest.ExpectedResponse
 
withStatus(int, String) - Method in interface kong.unirest.ExpectedResponse
 
A B C E F G H I K M O Q R T U V W 
Skip navigation links

Copyright © 2021. All rights reserved.