]
Toshiya Kobayashi commented on DROOLS-5897:
-------------------------------------------
Fixed by
Compound BigDecimal operator is translated to assignOperator in MVEL
--------------------------------------------------------------------
Key: DROOLS-5897
URL:
https://issues.redhat.com/browse/DROOLS-5897
Project: Drools
Issue Type: Bug
Components: core engine
Reporter: Luca Molteni
Assignee: Toshiya Kobayashi
Priority: Major
{code:java}
@Test
@Ignore("without B it doesn't work on MVEL")
public void testCompoundOperator() throws Exception {
// DROOLS-5894
String drl =
"import " + Person.class.getCanonicalName() + "\n" +
"dialect \"mvel\"\n" +
"rule R\n" +
"when\n" +
" $p : Person( age >= 26 )\n" +
"then\n" +
" $p.money += 50000;\n" +
"end";
KieSession ksession = getKieSession(drl);
Person john = new Person("John", 30);
john.setMoney( new BigDecimal( 70000 ) );
ksession.insert(john);
assertEquals(1, ksession.fireAllRules());
assertEquals(new BigDecimal( 120000 ), john.getMoney());
}{code}