'How to skip/mock the wireTap in camel route for junit test cases?
I have to write junit test cases for camel routes by skipping the wireTap. Or is there possibility to mock the wireTap? If yes then how ?
Thanks, Sreekanth
Solution 1:[1]
If your are wireTapping to uri "direct:foo", you can (for instance) weave your Camel route with:
weaveByToUri("direct:foo").replace().to("mock:junit");
More info at: https://camel.apache.org/manual/advice-with.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | TacheDeChoco |