org.apache.camel.spring.boot.CamelContextConfiguration Java Examples

The following examples show how to use org.apache.camel.spring.boot.CamelContextConfiguration. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IntegrationLoggingEnabledTest.java    From syndesis with Apache License 2.0 5 votes vote down vote up
@Test
public void testContextConfiguration() {
    assertThat(applicationContext.getBeansOfType(CamelContextConfiguration.class)).hasSize(2);
    assertThat(applicationContext.getBeansOfType(ActivityTracker.class)).hasSize(1);
    assertThat(applicationContext.getBeansOfType(ActivityTracker.class).values()).hasAtLeastOneElementOfType(ActivityTracker.SysOut.class);
    assertThat(camelContext.getLogListeners()).hasAtLeastOneElementOfType(IntegrationLoggingListener.class);
    assertThat(camelContext.getUuidGenerator()).isNotInstanceOf(DefaultUuidGenerator.class);
}
 
Example #2
Source File: IntegrationTracingDisabledTest.java    From syndesis with Apache License 2.0 5 votes vote down vote up
@Test
public void testDisabledContextConfiguration() {
    assertThat(applicationContext.getBeansOfType(CamelContextConfiguration.class).values())
        .doesNotHaveAnyElementsOfTypes(TracingCamelContextConfiguration.class);
    assertThat(applicationContext.getBeansOfType(CamelContextConfiguration.class)).hasSize(1);
    assertThat(camelContext.getLogListeners()).have(new Condition<LogListener>() {
        @Override
        public boolean matches(LogListener value) {
            return !(value instanceof TracingLogListener);
        }
    });
}
 
Example #3
Source File: IntegrationTracingEnabledTest.java    From syndesis with Apache License 2.0 5 votes vote down vote up
@Test
public void testContextConfiguration() {
    assertThat(applicationContext.getBeansOfType(CamelContextConfiguration.class).values())
        .hasAtLeastOneElementOfType(TracingCamelContextConfiguration.class);
    assertThat(applicationContext.getBeansOfType(CamelContextConfiguration.class)).hasSize(2);
    assertThat(applicationContext.getBeansOfType(Tracer.class)).hasSize(1);
    assertThat(camelContext.getLogListeners()).hasAtLeastOneElementOfType(TracingLogListener.class);
}
 
Example #4
Source File: CamelIrcAutoConfiguration.java    From syndesis-extensions with Apache License 2.0 4 votes vote down vote up
@Bean(name = "myCamIrcCustomConfigurer")
public CamelContextConfiguration integrationContextConfiguration() {
    LOG.info("CamelIrcAutoConfiguration custom behavior loaded correctly");
    return new CamelIrcContextConfiguration();
}
 
Example #5
Source File: IntegrationLoggingAutoConfiguration.java    From syndesis with Apache License 2.0 4 votes vote down vote up
@Bean
public CamelContextConfiguration integrationLoggingContextConfiguration(ActivityTracker activityTracker) {
    return new IntegrationLoggingCamelContextConfiguration(activityTracker);
}
 
Example #6
Source File: TracingAutoConfiguration.java    From syndesis with Apache License 2.0 4 votes vote down vote up
@Bean
public CamelContextConfiguration integrationLoggingContextConfiguration(Tracer tracer) {
    return new TracingCamelContextConfiguration(tracer);
}