org.apache.camel.test.spring
Class CamelSpringJUnit4ClassRunner

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.apache.camel.test.spring.CamelSpringJUnit4ClassRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable
Direct Known Subclasses:
CamelSpringJUnit4ClassRunner

public class CamelSpringJUnit4ClassRunner
extends org.springframework.test.context.junit4.SpringJUnit4ClassRunner

An implementation bringing the functionality of CamelSpringTestSupport to Spring Test based test cases. This approach allows developers to implement tests for their Spring based applications/routes using the typical Spring Test conventions for test development.


Nested Class Summary
static class CamelSpringJUnit4ClassRunner.CamelTestContextManager
          An implementation providing additional integration between Spring Test and Camel testing features.
 
Constructor Summary
CamelSpringJUnit4ClassRunner(Class<?> clazz)
           
 
Method Summary
protected  org.springframework.test.context.TestContextManager createTestContextManager(Class<?> clazz)
          Returns the specialized manager instance that provides tight integration between Camel testing features and Spring.
protected  String getDefaultContextLoaderClassName(Class<?> clazz)
          Returns the specialized loader for tight integration between Camel testing features and the application context initialization.
 
Methods inherited from class org.springframework.test.context.junit4.SpringJUnit4ClassRunner
createTest, 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, getTestRules, methodInvoker, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor
 
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, filter, getName, getRunnerAnnotations, getTestClass, runLeaf, 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

CamelSpringJUnit4ClassRunner

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

createTestContextManager

protected org.springframework.test.context.TestContextManager createTestContextManager(Class<?> clazz)
Returns the specialized manager instance that provides tight integration between Camel testing features and Spring.

Overrides:
createTestContextManager in class org.springframework.test.context.junit4.SpringJUnit4ClassRunner
Returns:
a new instance of CamelSpringJUnit4ClassRunner.CamelTestContextManager.

getDefaultContextLoaderClassName

protected String getDefaultContextLoaderClassName(Class<?> clazz)
Returns the specialized loader for tight integration between Camel testing features and the application context initialization.

Overrides:
getDefaultContextLoaderClassName in class org.springframework.test.context.junit4.SpringJUnit4ClassRunner
Returns:
Returns the class name for CamelSpringTestContextLoader


Apache Camel