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 void
addApplication
(HttpApplication application) Add an application to the server.protected abstract void
Create a server to bind a CHF application to in tests.final void
setUp()
Set up for tests.protected abstract int
Start the server.protected abstract void
Stop the server.final void
tearDown()
Tear down after tests.void
Test 500 errors are returned if the application doesn't start correctly.void
Test the application lifecycle for a described application.void
Test the application lifecycle.void
Test a request.void
Test an API request.void
Test the session.void
Test 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.
-