VerifyRuleFired vr = new VerifyRuleFired( "MyGoodRule",
1,
null );
sc.getFixtures().add( vr );
ScenarioRunResult res = null;
try {
res = testScenarioServiceImplementation.runScenario(pkg.getName(),
sc).getResult();
} catch ( ClassFormatError e ) {
fail( "Probably failed when loading a source file instead of class file. " + e );
}
assertNull( res.getErrors() );
assertNotNull( res.getScenario() );
assertTrue( vr.wasSuccessful() );
res = testScenarioServiceImplementation.runScenario(pkg.getName(),
sc).getResult();
assertNull( res.getErrors() );
assertNotNull( res.getScenario() );
assertTrue( vr.wasSuccessful() );
RuleBaseCache.getInstance().clearCache();
res = testScenarioServiceImplementation.runScenario(pkg.getName(),
sc).getResult();
assertNull( res.getErrors() );
assertNotNull( res.getScenario() );
assertTrue( vr.wasSuccessful() );
}