Class BindingTest


  • public abstract class BindingTest
    extends Object
    A test class for CHF bindings.
    • Constructor Detail

      • BindingTest

        public BindingTest()
    • Method Detail

      • createServer

        protected abstract void createServer()
        Create a server to bind a CHF application to in tests.
      • stopServer

        protected abstract void stopServer()
                                    throws Exception
        Stop the server.
        Throws:
        Exception - In case of error.
      • startServer

        protected abstract int startServer()
                                    throws Exception
        Start 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 Exception
        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

        @BeforeMethod
        public final void setUp()
                         throws Exception
        Set up for tests.
        Throws:
        Exception - In case of failure.
      • tearDown

        @AfterMethod
        public final void tearDown()
                            throws Exception
        Tear down after tests.
        Throws:
        Exception - In case of failure.
      • testDescribedHttpApplicationLifecycle

        public void testDescribedHttpApplicationLifecycle()
                                                   throws Exception
        Test the application lifecycle for a described application.
        Throws:
        Exception - In case of failure.
      • testHttpApplicationLifecycle

        public void testHttpApplicationLifecycle()
                                          throws Exception
        Test the application lifecycle.
        Throws:
        Exception - In case of failure.
      • testAnswerWith500IfHttpApplicationFailedToStart

        public void testAnswerWith500IfHttpApplicationFailedToStart()
                                                             throws Exception
        Test 500 errors are returned if the application doesn't start correctly.
        Throws:
        Exception - In case of failure.
      • testRequest

        public void testRequest()
                         throws Exception
        Test a request.
        Throws:
        Exception - In case of failure.
      • testSession

        public void testSession()
                         throws Exception
        Test the session.
        Throws:
        Exception - In case of failure.