Package org.apache.camel.test.spring
Class CamelAnnotationsHandler
- java.lang.Object
-
- org.apache.camel.test.spring.CamelAnnotationsHandler
-
public final class CamelAnnotationsHandler extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
handleCamelContextStartup(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass)
Handles starting of Camel contexts based onUseAdviceWith
and other state in the JVM.static void
handleDisableJmx(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass)
Handles disabling of JMX on Camel contexts based onDisableJmx
.static void
handleExcludeRoutesForSpringBoot(Class<?> testClass)
Handles @ExcludeRoutes to make it easier to exclude other routes when testing with Spring Boot.static void
handleMockEndpoints(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass)
Handles auto-intercepting of endpoints with mocks based onMockEndpoints
.static void
handleMockEndpointsAndSkip(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass)
Handles auto-intercepting of endpoints with mocks based onMockEndpointsAndSkip
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 onDisableJmx
.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 onShutdownTimeout
.static void
handleUseOverridePropertiesWithPropertiesComponent(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass)
Handles override this method to include and override properties with the CamelPropertiesComponent
.
-
-
-
Method Detail
-
handleExcludeRoutesForSpringBoot
public static void handleExcludeRoutesForSpringBoot(Class<?> testClass)
Handles @ExcludeRoutes to make it easier to exclude other routes when testing with Spring Boot.- Parameters:
testClass
- the test class being executed
-
handleDisableJmx
public static void handleDisableJmx(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass)
Handles disabling of JMX on Camel contexts based onDisableJmx
.- Parameters:
context
- the initialized Spring contexttestClass
- the test class being executed
-
handleRouteCoverage
public static void handleRouteCoverage(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass, Function testMethod) throws Exception
Handles disabling of JMX on Camel contexts based onDisableJmx
.- Parameters:
context
- the initialized Spring contexttestClass
- the test class being executed- Throws:
Exception
-
handleRouteCoverageDump
public static void handleRouteCoverageDump(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass, Function testMethod) throws Exception
- Throws:
Exception
-
handleProvidesBreakpoint
public static void handleProvidesBreakpoint(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
- Throws:
Exception
-
handleShutdownTimeout
public static void handleShutdownTimeout(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
Handles updating shutdown timeouts on Camel contexts based onShutdownTimeout
.- Parameters:
context
- the initialized Spring contexttestClass
- the test class being executed- Throws:
Exception
-
handleMockEndpoints
public static void handleMockEndpoints(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
Handles auto-intercepting of endpoints with mocks based onMockEndpoints
.- Parameters:
context
- the initialized Spring contexttestClass
- the test class being executed- Throws:
Exception
-
handleMockEndpointsAndSkip
public static void handleMockEndpointsAndSkip(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
Handles auto-intercepting of endpoints with mocks based onMockEndpointsAndSkip
and skipping the original endpoint.- Parameters:
context
- the initialized Spring contexttestClass
- the test class being executed- Throws:
Exception
-
handleUseOverridePropertiesWithPropertiesComponent
public static void handleUseOverridePropertiesWithPropertiesComponent(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
Handles override this method to include and override properties with the CamelPropertiesComponent
.- Parameters:
context
- the initialized Spring contexttestClass
- the test class being executed- Throws:
Exception
-
handleCamelContextStartup
public static void handleCamelContextStartup(org.springframework.context.ConfigurableApplicationContext context, Class<?> testClass) throws Exception
Handles starting of Camel contexts based onUseAdviceWith
and other state in the JVM.- Parameters:
context
- the initialized Spring contexttestClass
- the test class being executed- Throws:
Exception
-
-