v.getActualResult().intValue() );
}
@Test
public void testTestingEventListener() throws Exception {
Scenario sc = new Scenario();
sc.getRules().add( "foo" );
sc.getRules().add( "bar" );
ExecutionTrace ext = new ExecutionTrace();
sc.getFixtures().add( ext );
MockWorkingMemory wm = new MockWorkingMemory();
PseudoClockScheduler clock = new PseudoClockScheduler();
long time = new Date().getTime();
clock.setStartupTime( time );
clock.setSession( wm );
wm.setSessionClock( clock );
ScenarioRunner run = new ScenarioRunner( sc,
null,
wm );
assertEquals( wm,
run.getWorkingMemory() );
assertNotNull( wm.agendaEventListener );
assertTrue( wm.agendaEventListener instanceof TestingEventListener );
TestingEventListener lnr = (TestingEventListener) wm.agendaEventListener;
assertEquals( 2,
sc.getRules().size() );
assertTrue( sc.getRules().contains( "foo" ) );
assertTrue( sc.getRules().contains( "bar" ) );
}