public final class CamelAnnotationsHandler extends Object
Modifier and Type | Method and Description |
---|---|
static void |
cleanup(Class<?> testClass)
Cleanup/restore global state to defaults / pre-test values after the test setup is complete.
|
static void |
handleCamelContextStartup(org.springframework.context.ConfigurableApplicationContext context,
Class<?> testClass)
Handles starting of Camel contexts based on
UseAdviceWith and other state in the JVM. |
static void |
handleDisableJmx(org.springframework.context.ConfigurableApplicationContext context,
Class<?> testClass)
Handles disabling of JMX on Camel contexts based on
DisableJmx . |
static void |
handleExcludeRoutes(org.springframework.context.ConfigurableApplicationContext context,
Class<?> testClass)
Handles @ExcludeRoutes to make it easier to exclude other routes when testing with Spring.
|
static void |
handleMockEndpoints(org.springframework.context.ConfigurableApplicationContext context,
Class<?> testClass)
Handles auto-intercepting of endpoints with mocks based on
MockEndpoints . |
static void |
handleMockEndpointsAndSkip(org.springframework.context.ConfigurableApplicationContext context,
Class<?> testClass)
Handles auto-intercepting of endpoints with mocks based on
MockEndpointsAndSkip and skipping the original
endpoint. |
static void |
handleProvidesBreakpoint(org.springframework.context.ConfigurableApplicationContext context,
Class<?> testClass) |
static void |
handleRouteCoverage(org.springframework.context.ConfigurableApplicationContext context,
Class<?> testClass,
Function testMethod)
Handles disabling of JMX on Camel contexts based on
EnableRouteCoverage . |
static void |
handleRouteCoverageDump(org.springframework.context.ConfigurableApplicationContext context,
Class<?> testClass,
Function testMethod) |
static void |
handleShutdownTimeout(org.springframework.context.ConfigurableApplicationContext context,
Class<?> testClass)
Handles updating shutdown timeouts on Camel contexts based on
ShutdownTimeout . |
static void |
handleUseOverridePropertiesWithPropertiesComponent(org.springframework.context.ConfigurableApplicationContext context,
Class<?> testClass)
Handles override this method to include and override properties with the Camel
org.apache.camel.component.properties.PropertiesComponent . |
public static void cleanup(Class<?> testClass)
testClass
- the test class being executedpublic static void handleExcludeRoutes(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass)
context
- the initialized Spring contexttestClass
- the test class being executedpublic static void handleDisableJmx(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass)
DisableJmx
.context
- the initialized Spring contexttestClass
- the test class being executedpublic static void handleRouteCoverage(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass, Function testMethod) throws Exception
EnableRouteCoverage
.context
- the initialized Spring contexttestClass
- the test class being executedException
public static void handleRouteCoverageDump(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass, Function testMethod) throws Exception
Exception
public static void handleProvidesBreakpoint(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
Exception
public static void handleShutdownTimeout(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
ShutdownTimeout
.context
- the initialized Spring contexttestClass
- the test class being executedException
public static void handleMockEndpoints(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
MockEndpoints
.context
- the initialized Spring contexttestClass
- the test class being executedException
public static void handleMockEndpointsAndSkip(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
MockEndpointsAndSkip
and skipping the original
endpoint.context
- the initialized Spring contexttestClass
- the test class being executedException
public static void handleUseOverridePropertiesWithPropertiesComponent(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
org.apache.camel.component.properties.PropertiesComponent
.context
- the initialized Spring contexttestClass
- the test class being executedException
public static void handleCamelContextStartup(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
UseAdviceWith
and other state in the JVM.context
- the initialized Spring contexttestClass
- the test class being executedException
Apache Camel