December 2013
Intermediate to advanced
424 pages
9h 7m
English
In the recipes that have involved mock testing so far, it has been necessary to provide a mock: endpoint URI directly into a route, either explicitly or through dependency injection. Camel's test support classes provide a mechanism for automatically mocking endpoints that allow you to more easily test routes with embedded URIs. This recipe will show you how to exercise this functionality.
The Java code for this recipe is located in the org.camelcookbook.examples.testing.automocking package. The Spring route used here is located under src/main/resources/META-INF/spring/fixedEndpoints-context.xml.
Consider the following route, with fixed endpoints:
<from uri="activemq:in"/> <transform> <simple>Modified: ...
Read now
Unlock full access