Re: How to mock a processor

2013-10-17 Thread Olaf
I did add the id later, so it worked, but weaveByToString does not work. Anyway, I'm going to use ids -- View this message in context: http://camel.465427.n5.nabble.com/How-to-mock-a-processor-tp5741786p5741801.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to mock a processor

2013-10-17 Thread Christian Posta
It would be wise to give your nodes IDs so you can intercept them easier: eg: .process(new ReplaceBodyProcessor()).id("replaceBody") I'm not even sure how it did work for you with weaveById("ReplaceBodyProcessor") because camel uses a default id of "processN" where N is an incrementing integer

Re: How to mock a processor

2013-10-17 Thread contactreji
I shall give u a small advice on this . Pls note. All components don't support attachment . Attachments in the Camel exchange might be lost while passing throughout some Camel components. So by rule of thumb, make sure attachments are added to the exchange just before calling an email component

Re: How to mock a processor

2013-10-17 Thread Olaf
Thanks! That helps a lot. Somehow, I can only mock with weaveBeId method: weaveById("ReplaceBodyProcessor").replace().to("mock:ReplaceBodyProcessor"); then it is ReplaceBodyProcessor is skipped in test. If using weaveByToString(".*ReplaceBodyProcessor.*").replace().to("mock:ReplaceBodyProces

Re: How to mock a processor

2013-10-17 Thread Christian Posta
Take a look here: http://camel.apache.org/mock.html and the "Mocking existing endpoint" section On Thu, Oct 17, 2013 at 11:15 AM, Olaf wrote: > Hello, > > I'm trying to test a simple route which downloads emails and then split > attachments, replace body and sends each attachment to an anot