Unit Test the FROM URI of a route.

2014-12-23 Thread ManishGupta
Hi Team I want to unit test a route for which i used the AdviceWith function replaceFromWith(Direct:Start); with which i unit tested the route. I got success on that. But the issue is I replaced the FROM URI which is itself very complicated , Given Below : *from

Re: Junit Test Failing with AdviceWith

2014-12-17 Thread ManishGupta
Thanks for the help claus :) I read through the Javadocs and understood that start method is non blocking. If i have to use in a standalone application i have to use main function provided by camel. http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html I inturn used the

Junit Test Failing with AdviceWith

2014-12-16 Thread ManishGupta
Afternoon all, I have created Junit for existing production routes , Requirement was not to change anything from the route and test it with dummy data. From cameInAction and camel.apache.org i found the best approach will be to use adviceWith. I am using camel 2.10. When i run the Junit it

Re: Junit Test Failing with AdviceWith

2014-12-16 Thread ManishGupta
Thanks for the Prompt reply Claus , I know about the mockEndpoint (assertions and Expectations) , It is very well explained in the book I didn't use them to make it simpler at first. I didn't get your point on //You need to run the test for a longer time. The start method is non blocking. Can