public final class CamelSpringTestHelper extends Object
ThreadLocals to maintain some state. It is imperative
that the state setters and getters are accessed within the scope of a single thread in order
for this class to work right.| Modifier and Type | Class and Description |
|---|---|
static interface |
CamelSpringTestHelper.DoToSpringCamelContextsStrategy |
| Modifier and Type | Method and Description |
|---|---|
static void |
doToSpringCamelContexts(org.springframework.context.ApplicationContext context,
CamelSpringTestHelper.DoToSpringCamelContextsStrategy strategy)
Executes
strategy against all SpringCamelContexts found in the Spring context. |
static Collection<Method> |
getAllMethods(Class<?> clazz)
Returns all methods defined in
clazz and its superclasses/interfaces. |
static String |
getOriginalJmxDisabled() |
static Class<?> |
getTestClass() |
static Method |
getTestMethod() |
static void |
setOriginalJmxDisabledValue(String originalValue) |
static void |
setTestClass(Class<?> testClass) |
static void |
setTestContext(org.springframework.test.context.TestContext context) |
public static String getOriginalJmxDisabled()
public static void setOriginalJmxDisabledValue(String originalValue)
public static Class<?> getTestClass()
public static void setTestClass(Class<?> testClass)
public static Method getTestMethod()
public static void setTestContext(org.springframework.test.context.TestContext context)
public static Collection<Method> getAllMethods(Class<?> clazz)
clazz and its superclasses/interfaces.public static void doToSpringCamelContexts(org.springframework.context.ApplicationContext context,
CamelSpringTestHelper.DoToSpringCamelContextsStrategy strategy)
throws Exception
strategy against all SpringCamelContexts found in the Spring context.
This method reduces the amount of repeated find and loop code throughout this class.context - the Spring context to searchstrategy - the strategy to execute against the found SpringCamelContextsException - if there is an error executing any of the strategiesApache Camel