@Test
public void testEnumTypeString() {
//A legacy "Guvnor" enums (i.e pick-list of underlying field data-type)
String expected = "rule \"my rule\"\n\tdialect \"mvel\"\n\twhen\n\t\tCheese( type == \"CHEDDAR\" )\n"
+ "\tthen\n\t\tinsert( new Report() );\nend\n";
final RuleModel m = new RuleModel();
final FactPattern pat = new FactPattern( "Cheese" );
m.addLhsItem( pat );
final SingleFieldConstraint con = new SingleFieldConstraint();
con.setFieldName( "type" );
con.setOperator( "==" );
con.setValue( "CHEDDAR" );
con.setFieldType( DataType.TYPE_STRING );
con.setConstraintValueType( BaseSingleFieldConstraint.TYPE_ENUM );
pat.addConstraint( con );
m.addRhsItem( new ActionInsertFact( "Report" ) );
m.name = "my rule";
checkMarshallUnmarshall( expected, m );
}