use of org.apache.camel.component.sql.stored.template.ast.InputParameter in project camel by apache.
the class ParserTest method nestedSimpleExpression.
@Test
public void nestedSimpleExpression() {
Exchange exchange = createExchangeWithBody(1);
exchange.getIn().setHeader("foo", 1);
exchange.getIn().setHeader("bar", 3);
Template template = parser.parseTemplate("ADDNUMBERS2(INTEGER ${header.foo},INTEGER ${header.bar})");
assertEquals(1, ((InputParameter) template.getParameterList().get(0)).getValueExtractor().eval(exchange, null));
assertEquals(3, ((InputParameter) template.getParameterList().get(1)).getValueExtractor().eval(exchange, null));
}
Aggregations