Package org.forgerock.http.bindings
Class BindingTest
java.lang.Object
org.forgerock.http.bindings.BindingTest
A test class for CHF bindings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddApplication(HttpApplication application) Add an application to the server.protected abstract voidCreate a server to bind a CHF application to in tests.final voidsetUp()Set up for tests.protected abstract intStart the server.protected abstract voidStop the server.final voidtearDown()Tear down after tests.voidTest 500 errors are returned if the application doesn't start correctly.voidTest the application lifecycle for a described application.voidTest the application lifecycle.voidTest a request.voidTest an API request.voidTest the session.voidTest the presence of the transaction context and the propagation of the transactionId.
-
Constructor Details
-
BindingTest
public BindingTest()
-
-
Method Details
-
createServer
Create a server to bind a CHF application to in tests. -
stopServer
Stop the server.- Throws:
Exception- In case of error.
-
startServer
Start the server.- Returns:
- The port number the server is listening on.
- Throws:
Exception- In case of error.
-
addApplication
Add an application to the server. The application should be added to the root path.- Parameters:
application- The application.- Throws:
Exception- In case of failure.
-
setUp
Set up for tests.- Throws:
Exception- In case of failure.
-
tearDown
Tear down after tests.- Throws:
Exception- In case of failure.
-
testDescribedHttpApplicationLifecycle
Test the application lifecycle for a described application.- Throws:
Exception- In case of failure.
-
testHttpApplicationLifecycle
Test the application lifecycle.- Throws:
Exception- In case of failure.
-
testAnswerWith500IfHttpApplicationFailedToStart
Test 500 errors are returned if the application doesn't start correctly.- Throws:
Exception- In case of failure.
-
testRequest
Test a request.- Throws:
Exception- In case of failure.
-
testRequestApi
Test an API request.- Throws:
Exception- In case of failure.
-
testSession
Test the session.- Throws:
Exception- In case of failure.
-
testTransactionContext
Test the presence of the transaction context and the propagation of the transactionId.- Throws:
Exception- In case of failure.
-