Package org.forgerock.http.bindings
Class BindingTest
- java.lang.Object
-
- org.forgerock.http.bindings.BindingTest
-
public abstract class BindingTest extends Object
A test class for CHF bindings.
-
-
Constructor Summary
Constructors Constructor Description BindingTest()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddApplication(org.forgerock.http.HttpApplication application)Add an application to the server.protected abstract voidcreateServer()Create a server to bind a CHF application to in tests.voidsetUp()Set up for tests.protected abstract intstartServer()Start the server.protected abstract voidstopServer()Stop the server.voidtearDown()Tear down after tests.voidtestAnswerWith500IfHttpApplicationFailedToStart()Test 500 errors are returned if the application doesn't start correctly.voidtestDescribedHttpApplicationLifecycle()Test the application lifecycle for a described application.voidtestHttpApplicationLifecycle()Test the application lifecycle.voidtestRequest()Test a request.voidtestSession()Test the session.
-
-
-
Method Detail
-
createServer
protected abstract void createServer()
Create a server to bind a CHF application to in tests.
-
stopServer
protected abstract void stopServer() throws ExceptionStop the server.- Throws:
Exception- In case of error.
-
startServer
protected abstract int startServer() throws ExceptionStart the server.- Returns:
- The port number the server is listening on.
- Throws:
Exception- In case of error.
-
addApplication
protected abstract void addApplication(org.forgerock.http.HttpApplication application) throws ExceptionAdd 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
@BeforeMethod public final void setUp() throws ExceptionSet up for tests.- Throws:
Exception- In case of failure.
-
tearDown
@AfterMethod public final void tearDown() throws ExceptionTear down after tests.- Throws:
Exception- In case of failure.
-
testDescribedHttpApplicationLifecycle
public void testDescribedHttpApplicationLifecycle() throws ExceptionTest the application lifecycle for a described application.- Throws:
Exception- In case of failure.
-
testHttpApplicationLifecycle
public void testHttpApplicationLifecycle() throws ExceptionTest the application lifecycle.- Throws:
Exception- In case of failure.
-
testAnswerWith500IfHttpApplicationFailedToStart
public void testAnswerWith500IfHttpApplicationFailedToStart() throws ExceptionTest 500 errors are returned if the application doesn't start correctly.- Throws:
Exception- In case of failure.
-
testRequest
public void testRequest() throws ExceptionTest a request.- Throws:
Exception- In case of failure.
-
-