assertTrue( sc.wasSuccessful() );
}
public void testIntegrationWithFailure() throws Exception {
Scenario sc = new Scenario();
Expectation[] assertions = populateScenarioForFailure(sc);
TypeResolver resolver = new ClassTypeResolver( new HashSet<String>(),
Thread.currentThread().getContextClassLoader() );
resolver.addImport( "org.drools.Cheese" );
resolver.addImport( "org.drools.Person" );
WorkingMemory wm = getWorkingMemory( "test_rules2.drl" );
ScenarioRunner run = new ScenarioRunner( sc,
resolver,
(InternalWorkingMemory) wm );
assertSame( run.scenario,
sc );
assertFalse( sc.wasSuccessful() );
VerifyFact vf = (VerifyFact) assertions[1];
assertFalse( ((VerifyField) vf.fieldValues.get( 0 )).successResult );
assertEquals( "XXX",
((VerifyField) vf.fieldValues.get( 0 )).expected );