Class AbstractTestDelegate

    • Field Detail

      • clazz

        protected Class clazz
        The class
      • enableSecurity

        public boolean enableSecurity
        Whether security is enabled
      • securityPolicyName

        public String securityPolicyName
        The security policy name
    • Constructor Detail

      • AbstractTestDelegate

        public AbstractTestDelegate​(Class clazz)
        Create a new test delegate
        Parameters:
        clazz - the class
    • Method Detail

      • getDelegate

        protected static AbstractTestDelegate getDelegate​(Class clazz)
                                                   throws Exception
        Get the test delegate. This queries the clazz, and its superclasses for a static getDelegate(Class) method to allow for testclass specific delegates.
        Parameters:
        clazz - the test class
        Returns:
        the delegate
        Throws:
        Exception - for any error
      • enableTrace

        protected void enableTrace​(String name)
        Enable trace
        Parameters:
        name - the logging context
      • setUp

        public void setUp()
                   throws Exception
        Setup callback. This calls setUpLogging and if enableSecurity is true, setUpSecurity.
        Throws:
        Exception - for any error
      • tearDown

        public void tearDown()
                      throws Exception
        Teardown. If enableSecurity is true, this calls tearDownSecurity. The tearDownLogging is then called regardless.
        Throws:
        Exception - for any error
      • setUpLogging

        public void setUpLogging()
                          throws Exception
        Setup the logging
        Throws:
        Exception - for any error
      • tearDownLogging

        public void tearDownLogging()
                             throws Exception
        Teardown the logging
        Throws:
        Exception - for any error
      • setUpSecurity

        protected void setUpSecurity()
                              throws Exception
        Setup the security
        Throws:
        Exception - for any error
      • tearDownSecurity

        public void tearDownSecurity()
                              throws Exception
        Teardown the security
        Throws:
        Exception - for any error
      • log

        protected void log​(String context)
        Log an event with the given context
        Parameters:
        context - the context