m );
}
@Test
public void testUpdateModifyMultipleFieldsWithMultipleSkipped1() {
TemplateModel m = new TemplateModel();
m.name = "r1";
FactPattern fp = new FactPattern( "Person" );
fp.setBoundName( "$p" );
m.addLhsItem( fp );
ActionUpdateField auf1 = new ActionUpdateField( "$p" );
ActionFieldValue afv0 = new ActionFieldValue();
afv0.setNature( FieldNatureType.TYPE_TEMPLATE );
afv0.setField( "field1" );
afv0.setValue( "$f1" );
auf1.addFieldValue( afv0 );
ActionFieldValue afv1 = new ActionFieldValue();
afv1.setNature( FieldNatureType.TYPE_TEMPLATE );
afv1.setField( "field2" );
afv1.setValue( "$f2" );
auf1.addFieldValue( afv1 );
ActionFieldValue afv2 = new ActionFieldValue();
afv2.setNature( FieldNatureType.TYPE_TEMPLATE );
afv2.setField( "field3" );
afv2.setValue( "$f3" );
auf1.addFieldValue( afv2 );
m.addRhsItem( auf1 );
String expected = "rule \"r1_0\"\n" +
"dialect \"mvel\"\n" +
"when\n" +
" $p : Person()\n" +
"then\n" +
" modify( $p ) {\n" +
" setField1(\"v1\"),\n" +
" setField2(\"v2\"),\n" +
" setField3(\"v3\")\n" +
" }\n" +
"end";
m.addRow( new String[]{ "v1", "v2", "v3" } );
checkMarshall( expected,
m );
}