Luca Molteni created DROOLS-5897:
------------------------------------
Summary: 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: Luca Molteni
{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}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)