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.

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.

Reply via email to