I am trying to test my Camel routes using Cucumber, which requires me to use another TestRunner (Cucumber.class). In the tests I would like to mock certain endpoints.
I read that my test class should extend the CamelSpringTestSupport class. Extending the class requires me to implement the createApplicationContext() method. On the web I find many examples how to do that when you use xml to define your routes. One example is:
protected AbstractXmlApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext("classpath:context.xml");
}
However, how do you implement this method if you use the Java DSL?
Aucun commentaire:
Enregistrer un commentaire