use of org.apache.camel.spring.boot.RoutesCollector in project camel by apache.
the class Configuration method shouldOnlyCollectRoutesOnce.
@Test
public void shouldOnlyCollectRoutesOnce() {
GenericApplicationContext parent = new GenericApplicationContext();
parent.refresh();
ConfigurableApplicationContext context = new SpringApplicationBuilder(Configuration.class).web(false).parent(parent).run();
ContextRefreshedEvent refreshEvent = new ContextRefreshedEvent(context);
RoutesCollector collector = context.getBean(RoutesCollector.class);
//no changes should happen here
collector.onApplicationEvent(refreshEvent);
}
Aggregations