Package org.forgerock.http.handler
Class HttpClientHandlerTest
java.lang.Object
org.forgerock.http.handler.HttpClientHandlerTest
This is the base class to ensure common behaviour between CHF client implementations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.xebialabs.restito.server.StubServer
The HTTP server to query. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract HttpClientHandler
Instantiates the expected HttpClientHandler to test.void
cleanup()
Reset the HTTP server.void
setUp()
Setup the HTTP server.void
Ensure that a response with status BAD_GATEWAY is received when an error occurred.void
Ensure that a response is produced.void
Ensure that a request with a posted empty entity can be sent.void
Ensure that a request with a posted entity can be sent.void
tearDown()
Stop the HTTP server.
-
Field Details
-
server
The HTTP server to query.
-
-
Constructor Details
-
HttpClientHandlerTest
public HttpClientHandlerTest()
-
-
Method Details
-
setUp
Setup the HTTP server. -
tearDown
Stop the HTTP server. -
cleanup
Reset the HTTP server. -
shouldProduceResponse
Ensure that a response is produced.- Throws:
Exception
- In case of failure.
-
shouldSendPostHttpMessageWithEntityContent
Ensure that a request with a posted entity can be sent.- Throws:
Exception
- In case of failure.
-
shouldSendPostHttpMessageWithEmptyEntity
Ensure that a request with a posted empty entity can be sent.- Throws:
Exception
- In case of failure.
-
shouldFailToObtainResponse
Ensure that a response with status BAD_GATEWAY is received when an error occurred.- Throws:
Exception
- In case of failure.
-
buildHttpClientHandler
Instantiates the expected HttpClientHandler to test.- Returns:
- the expected HttpClientHandler to test.
- Throws:
HttpApplicationException
- In case of failure when trying to create it.
-