On Thu, Jan 10, 2013 at 9:10 AM, dhruv.sachdeva
<[email protected]> wrote:
> Hi ,
> I have to write a unit test case for myclass which routes a message to
> queues using choice processor and checking predicates such as when.
>

Okay good luck with writing that test.
Do you have any questions?


> Here is a code snippet:-
>
> from("direct:setMessageIdentifier").
>                         choice().
>
> when(ns.xpath("/cus:CustomerUpdateRoot")).setHeader("MessageIdentifier",ns.xpath("/cus:CustomerUpdateRoot/cus",String.class)).setHeader("MessageType",
> constant("Customer")).to("direct:applyIdempotent").
>                         
> when(ns.xpath("/customer:some")).setHeader("BusinessKey",
> ns.xpath("/cust",String.class)).setHeader("MessageType",
> constant("Cust")).to("direct:applyIdempotent");
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-choice-processor-tp5725214.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to