org.apache.camel.testng
Class AbstractCamelTestNGSpringContextTests.TestNGCamelSpringTestContextLoader

java.lang.Object
  extended by org.springframework.test.context.support.AbstractContextLoader
      extended by org.apache.camel.test.spring.CamelSpringTestContextLoader
          extended by org.apache.camel.testng.AbstractCamelTestNGSpringContextTests.TestNGCamelSpringTestContextLoader
All Implemented Interfaces:
org.springframework.test.context.ContextLoader, org.springframework.test.context.SmartContextLoader
Enclosing class:
AbstractCamelTestNGSpringContextTests

public static final class AbstractCamelTestNGSpringContextTests.TestNGCamelSpringTestContextLoader
extends org.apache.camel.test.spring.CamelSpringTestContextLoader


Constructor Summary
AbstractCamelTestNGSpringContextTests.TestNGCamelSpringTestContextLoader()
           
 
Method Summary
protected  String[] generateDefaultLocations(Class<?> clazz)
          Since AbstractTestNGSpringContextTests declares the test context as private and we cannot control its instantiation, we need to use ContextConfiguration on AbstractCamelTestNGSpringContextTests.
 
Methods inherited from class org.apache.camel.test.spring.CamelSpringTestContextLoader
cleanup, createContext, getResourceSuffix, getTestClass, handleCamelContextStartup, handleDisableJmx, handleLazyLoadTypeConverters, handleMockEndpoints, handleMockEndpointsAndSkip, handleProvidesBreakpoint, handleShutdownTimeout, loadBeanDefinitions, loadBeanDefinitions, loadContext, loadContext, loadContext
 
Methods inherited from class org.springframework.test.context.support.AbstractContextLoader
isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCamelTestNGSpringContextTests.TestNGCamelSpringTestContextLoader

public AbstractCamelTestNGSpringContextTests.TestNGCamelSpringTestContextLoader()
Method Detail

generateDefaultLocations

protected String[] generateDefaultLocations(Class<?> clazz)
Since AbstractTestNGSpringContextTests declares the test context as private and we cannot control its instantiation, we need to use ContextConfiguration on AbstractCamelTestNGSpringContextTests. Unfortunately, this also tries to load the a context resource based on the default naming convention. We don't want to require end users to always have a resource for their tests' abstract parent so we override the behavior here to prevent that from happening.

Overrides:
generateDefaultLocations in class org.springframework.test.context.support.AbstractContextLoader


Apache Camel