rule2.checkin("");
rulesRepository.save();
//first, the green scenario
Scenario sc = new Scenario();
FactData person = new FactData();
person.setName( "p" );
person.setType( "Person" );
person.getFieldData().add( new FieldData( "age",
"40" ) );
person.getFieldData().add( new FieldData( "name",
"michael" ) );
sc.getFixtures().add( person );
sc.getFixtures().add( new ExecutionTrace() );
VerifyRuleFired vr = new VerifyRuleFired( "rule1",
1,
null );
sc.getFixtures().add( vr );
VerifyFact vf = new VerifyFact();
vf.setName( "p" );
vf.getFieldValues().add( new VerifyField( "name",
"michael",
"==" ) );
vf.getFieldValues().add( new VerifyField( "age",
"42",
"==" ) );
sc.getFixtures().add( vf );
AssetItem scenario1 = pkg.addAsset( "scen1",
"" );
scenario1.updateFormat( AssetFormats.TEST_SCENARIO );
scenario1.updateContent( ScenarioXMLPersistence.getInstance().marshal( sc ) );
scenario1.checkin( "" );
//now the bad scenario
sc = new Scenario();
person = new FactData();
person.setName( "p" );
person.setType( "Person" );
person.getFieldData().add( new FieldData( "age",
"40" ) );
person.getFieldData().add( new FieldData( "name",
"michael" ) );
sc.getFixtures().add( person );
sc.getFixtures().add( new ExecutionTrace() );
vr = new VerifyRuleFired( "rule2",