public void testEnumTypeDate() {
//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( dateMade == \"31-Jan-2010\" )\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( "dateMade" );
con.setOperator( "==" );
con.setValue( "31-Jan-2010" );
con.setFieldType( DataType.TYPE_DATE );
con.setConstraintValueType( BaseSingleFieldConstraint.TYPE_ENUM );
pat.addConstraint( con );
m.addRhsItem( new ActionInsertFact( "Report" ) );
m.name = "my rule";
checkMarshallUnmarshall( expected, m );