use of org.drools.compiler.lang.descr.BindingDescr in project drools by kiegroup.
the class MVELDumperTest method testDumpBindings.
@Test
public void testDumpBindings() throws Exception {
String input = "$x : property > value";
String expected = "property > value";
ConstraintConnectiveDescr descr = parse(input);
MVELDumperContext ctx = new MVELDumperContext();
String result = dumper.dump(descr, ctx);
assertEquals(expected, result);
assertEquals(1, ctx.getBindings().size());
BindingDescr bind = ctx.getBindings().get(0);
assertEquals("$x", bind.getVariable());
assertEquals("property", bind.getExpression());
}
Aggregations