Class ActiveMQTestRunner

  • All Implemented Interfaces:
    org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable

    public class ActiveMQTestRunner
    extends org.junit.runners.BlockJUnit4ClassRunner
    A Custom JUnit test runner for customizing JUnit tests run in ActiveMQ.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected long getOriginalTimeout​(org.junit.runners.model.FrameworkMethod frameworkMethod)
      Retrieve the original JUnit timeout from the @Test annotation on the incoming test method.
      protected org.junit.runners.model.Statement methodBlock​(org.junit.runners.model.FrameworkMethod method)  
      protected org.junit.runners.model.Statement withPotentialRepeat​(org.junit.runners.model.FrameworkMethod frameworkMethod, org.junit.runners.model.Statement next)
      Check for the presence of a Repeat annotation and return a RepeatStatement to handle executing the test repeated or the original value if not repeating.
      protected org.junit.runners.model.Statement withPotentialTimeout​(org.junit.runners.model.FrameworkMethod frameworkMethod, Object testInstance, org.junit.runners.model.Statement next)
      Perform the same logic as BlockJUnit4ClassRunner.withPotentialTimeout(FrameworkMethod, Object, Statement) but with additional support for changing the coded timeout with an extended value.
      • Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner

        collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores
      • Methods inherited from class org.junit.runners.ParentRunner

        childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation
      • Methods inherited from class org.junit.runner.Runner

        testCount
    • Constructor Detail

      • ActiveMQTestRunner

        public ActiveMQTestRunner​(Class<?> klass)
                           throws org.junit.runners.model.InitializationError
        Throws:
        org.junit.runners.model.InitializationError
    • Method Detail

      • methodBlock

        protected org.junit.runners.model.Statement methodBlock​(org.junit.runners.model.FrameworkMethod method)
        Overrides:
        methodBlock in class org.junit.runners.BlockJUnit4ClassRunner
      • withPotentialTimeout

        protected org.junit.runners.model.Statement withPotentialTimeout​(org.junit.runners.model.FrameworkMethod frameworkMethod,
                                                                         Object testInstance,
                                                                         org.junit.runners.model.Statement next)
        Perform the same logic as BlockJUnit4ClassRunner.withPotentialTimeout(FrameworkMethod, Object, Statement) but with additional support for changing the coded timeout with an extended value.
        Overrides:
        withPotentialTimeout in class org.junit.runners.BlockJUnit4ClassRunner
        Returns:
        either a FailOnTimeout, or the supplied Statement as appropriate.
      • withPotentialRepeat

        protected org.junit.runners.model.Statement withPotentialRepeat​(org.junit.runners.model.FrameworkMethod frameworkMethod,
                                                                        org.junit.runners.model.Statement next)
        Check for the presence of a Repeat annotation and return a RepeatStatement to handle executing the test repeated or the original value if not repeating.
        Returns:
        either a RepeatStatement, or the supplied Statement as appropriate.
      • getOriginalTimeout

        protected long getOriginalTimeout​(org.junit.runners.model.FrameworkMethod frameworkMethod)
        Retrieve the original JUnit timeout from the @Test annotation on the incoming test method.
        Returns:
        the timeout, or 0 if none was specified