Package org.apache.camel.test.spring
Class CamelSpringDelegatingTestContextLoader
- java.lang.Object
-
- org.springframework.test.context.support.AbstractDelegatingSmartContextLoader
-
- org.springframework.test.context.support.DelegatingSmartContextLoader
-
- org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader
-
- All Implemented Interfaces:
org.springframework.test.context.ContextLoader
,org.springframework.test.context.SmartContextLoader
@Deprecated public class CamelSpringDelegatingTestContextLoader extends org.springframework.test.context.support.DelegatingSmartContextLoader
Deprecated.useCamelSpringRunner
orCamelSpringBootRunner
instead.CamelSpringDelegatingTestContextLoader which fixes issues in Camel's JavaConfigContextLoader. (adds support for Camel's test annotations)
This loader can handle either classes or locations for configuring the context.
NOTE: This TestContextLoader doesn't support the annotation of ExcludeRoutes now.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
logger
Deprecated.
-
Constructor Summary
Constructors Constructor Description CamelSpringDelegatingTestContextLoader()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected Class<?>
getTestClass()
Deprecated.Returns the class under test in order to enable inspection of annotations while the Spring context is being created.protected Method
getTestMethod()
Deprecated.Returns the test method under test.org.springframework.context.ApplicationContext
loadContext(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass)
Deprecated.Performs the bulk of the Spring application context loading/customization.org.springframework.context.ApplicationContext
loadContext(org.springframework.test.context.MergedContextConfiguration mergedConfig)
Deprecated.-
Methods inherited from class org.springframework.test.context.support.DelegatingSmartContextLoader
getAnnotationConfigLoader, getXmlLoader
-
-
-
-
Method Detail
-
loadContext
public org.springframework.context.ApplicationContext loadContext(org.springframework.test.context.MergedContextConfiguration mergedConfig) throws Exception
Deprecated.- Specified by:
loadContext
in interfaceorg.springframework.test.context.SmartContextLoader
- Overrides:
loadContext
in classorg.springframework.test.context.support.AbstractDelegatingSmartContextLoader
- Throws:
Exception
-
loadContext
public org.springframework.context.ApplicationContext loadContext(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
Deprecated.Performs the bulk of the Spring application context loading/customization.- Parameters:
context
- the partially configured context. The context should have the bean definitions loaded, but nothing else.testClass
- the test class being executed- Returns:
- the initialized (refreshed) Spring application context
- Throws:
Exception
- if there is an error during initialization/customization
-
getTestClass
protected Class<?> getTestClass()
Deprecated.Returns the class under test in order to enable inspection of annotations while the Spring context is being created.- Returns:
- the test class that is being executed
- See Also:
CamelSpringTestHelper
-
getTestMethod
protected Method getTestMethod()
Deprecated.Returns the test method under test.- Returns:
- the method that is being executed
- See Also:
CamelSpringTestHelper
-
-