use of org.apache.camel.ConsumerTemplate in project camel by apache.
the class ConsumerTemplateHasTwoTemplatesTest method testHasTwoTemplates.
@Test
public void testHasTwoTemplates() {
ConsumerTemplate lookup = context.getRegistry().lookupByNameAndType("myTemplate", ConsumerTemplate.class);
assertNotNull("Should lookup producer template", lookup);
ConsumerTemplate lookup2 = context.getRegistry().lookupByNameAndType("myOtherTemplate", ConsumerTemplate.class);
assertNotNull("Should lookup producer template", lookup2);
assertNotSame("Should not be same", lookup, lookup2);
}
use of org.apache.camel.ConsumerTemplate in project camel by apache.
the class ProducerTemplateAutoRegisterTwoCamelContextsTest method testHasNoConsumerTemplateCamel1.
@Test
public void testHasNoConsumerTemplateCamel1() {
ConsumerTemplate lookup = context1.getRegistry().lookupByNameAndType("consumerTemplate", ConsumerTemplate.class);
assertNull("Should NOT lookup consumer template", lookup);
}
use of org.apache.camel.ConsumerTemplate in project camel by apache.
the class ProducerTemplateAutoRegisterTwoCamelContextsTest method testHasNoConsumerTemplateCamel2.
@Test
public void testHasNoConsumerTemplateCamel2() {
ConsumerTemplate lookup = context2.getRegistry().lookupByNameAndType("consumerTemplate", ConsumerTemplate.class);
assertNull("Should NOT lookup consumer template", lookup);
}
use of org.apache.camel.ConsumerTemplate in project camel by apache.
the class ProducerTemplateMixedAutoRegisterTwoCamelContextsTest method testHasNoConsumerTemplateCamel2.
@Test
public void testHasNoConsumerTemplateCamel2() {
ConsumerTemplate lookup = context2.getRegistry().lookupByNameAndType("consumerTemplate", ConsumerTemplate.class);
assertNull("Should NOT lookup consumer template", lookup);
}
use of org.apache.camel.ConsumerTemplate in project camel by apache.
the class CamelSpringBootTemplateShutdownTest method setupApplicationContext.
@Before
public void setupApplicationContext() {
applicationContext = new AnnotationConfigApplicationContext(CamelAutoConfiguration.class);
camelContext = applicationContext.getBean(CamelContext.class);
consumerTemplate = applicationContext.getBean(ConsumerTemplate.class);
producerTemplate = applicationContext.getBean(ProducerTemplate.class);
}
Aggregations