Hi
I need to test whether the predicate object matches the exchange for various
expression languages. I need to know what exchange value I need to set in
exchange to validate the predicate.
public void test() {
String expression="//orders/value>10"';
CamelContext context = new DefaultCamelContext();
Predicate predicate=new
JXpathExpression(expression,boolean.class);
Exchange exchange = new DefaultExchange(context);
Message in = exchange.getIn();
in.setBody(""); // how i need to set the message in exchange
in order to evaluate it against pre
exchange.setIn(in);
boolean check=predicate.matches(exchange);
}
for Jxpath : the predicate object contains JXpath[//orders/value>10], how i
need to set the exchange in order to evaluate this expression.
Thank you
--
View this message in context:
http://camel.465427.n5.nabble.com/Expression-Language-exchange-test-tp5633420p5633420.html
Sent from the Camel - Users mailing list archive at Nabble.com.