Spring AMQP

org.springframework.amqp.rabbit.test
Class SpringRabbitJUnit4ClassRunner

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
          extended by org.junit.runners.BlockJUnit4ClassRunner
              extended by org.springframework.test.context.junit4.SpringJUnit4ClassRunner
                  extended by org.springframework.amqp.rabbit.test.SpringRabbitJUnit4ClassRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public class SpringRabbitJUnit4ClassRunner
extends SpringJUnit4ClassRunner

A specialized JUnit4 class runner so that we can add a RabbitTestExecutionListener. The RabbitTestExecutionListener needs to run before the DependencyInjectionTestExecutionListener so that the RabbitMQ broker application and be 'reset' or the RabbitMQ node started before the application context is created so that RabbitMQ broker configuration can execute when the applicatin context is created.

Author:
Mark Pollack

Constructor Summary
SpringRabbitJUnit4ClassRunner(Class<?> clazz)
           
 
Method Summary
protected  TestContextManager createTestContextManager(Class<?> clazz)
          Creates a new TestContextManager for the supplied test class and the configured default ContextLoader class name.
 
Methods inherited from class org.springframework.test.context.junit4.SpringJUnit4ClassRunner
createTest, getDefaultContextLoaderClassName, getDescription, getExpectedException, getJUnitTimeout, getSpringTimeout, getTestContextManager, isTestMethodIgnored, methodBlock, possiblyExpectingExceptions, run, runChild, withAfterClasses, withAfters, withBeforeClasses, withBefores, withPotentialRepeat, withPotentialTimeout
 
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, describeChild, getChildren, methodInvoker, testName, validateConstructor, validateInstanceMethods, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor
 
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, filter, getName, getTestClass, setScheduler, sort, validatePublicVoidNoArgMethods
 
Methods inherited from class org.junit.runner.Runner
testCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringRabbitJUnit4ClassRunner

public SpringRabbitJUnit4ClassRunner(Class<?> clazz)
                              throws org.junit.runners.model.InitializationError
Throws:
org.junit.runners.model.InitializationError
Method Detail

createTestContextManager

protected TestContextManager createTestContextManager(Class<?> clazz)
Creates a new TestContextManager for the supplied test class and the configured default ContextLoader class name. Can be overridden by subclasses.

Overrides:
createTestContextManager in class SpringJUnit4ClassRunner
Parameters:
clazz - the test class to be managed
See Also:
SpringJUnit4ClassRunner.getDefaultContextLoaderClassName(Class)

Spring AMQP

Copyright © 2010. All Rights Reserved.