assertTrue( xml.endsWith( "</rule>" ) );
}
@Test
public void testBasics() {
final BRLPersistence p = BRXMLPersistence.getInstance();
final RuleModel m = new RuleModel();
m.addLhsItem( new FactPattern( "Person" ) );
m.addLhsItem( new FactPattern( "Accident" ) );
m.addAttribute( new RuleAttribute( "no-loop",
"true" ) );
m.addRhsItem( new ActionInsertFact( "Report" ) );
ActionGlobalCollectionAdd ag = new ActionGlobalCollectionAdd();
ag.setFactName( "x" );
ag.setGlobalName( "g" );
m.addRhsItem( ag );
m.name = "my rule";
final String xml = p.marshal( m );
System.out.println( xml );
assertTrue( xml.indexOf( "Person" ) > -1 );
assertTrue( xml.indexOf( "Accident" ) > -1 );
assertTrue( xml.indexOf( "no-loop" ) > -1 );
assertTrue( xml.indexOf( "org.kie" ) == -1 );