Package com.yahoo.restapi
Class RestApiTestDriver
java.lang.Object
com.yahoo.restapi.RestApiTestDriver
- All Implemented Interfaces:
AutoCloseable
Test driver for
RestApi- Author:
- bjorncs
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()executeRequest(HttpRequest request) handler()com.fasterxml.jackson.databind.ObjectMapperstatic RestApiTestDriver.BuildernewBuilder(RestApiRequestHandler<?> handler) static RestApiTestDriver.Builder<T> TparseJacksonResponseContent(HttpResponse response, com.fasterxml.jackson.core.type.TypeReference<T> type) <T> TparseJacksonResponseContent(HttpResponse response, Class<T> type) requestContentOf(Object jacksonEntity) restApi()
-
Method Details
-
newBuilder
-
newBuilder
public static RestApiTestDriver.Builder newBuilder(RestApiTestDriver.RestApiRequestHandlerFactory factory) -
createHandlerTestContext
-
listenPort
-
handler
-
restApi
-
jacksonJsonMapper
public com.fasterxml.jackson.databind.ObjectMapper jacksonJsonMapper() -
executeRequest
-
requestContentOf
-
parseJacksonResponseContent
public <T> T parseJacksonResponseContent(HttpResponse response, com.fasterxml.jackson.core.type.TypeReference<T> type) -
parseJacksonResponseContent
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-