assertTrue(sc.wasSuccessful());
}
@Test
public void testIntegrationWithRetract() throws Exception {
Scenario sc = new Scenario();
sc.getImports().addImport(new Import("org.drools.workbench.models.testscenarios.backend.Cheese"));
sc.getFixtures().add(new FactData("Cheese",
"c1",
Arrays.<Field>asList(new FieldData("price",
"46"),
new FieldData("type",
"XXX")),
false));
sc.getFixtures().add(new FactData("Cheese",
"c2",
Arrays.<Field>asList(new FieldData("price",
"42")),
false));
sc.getFixtures().add(new ExecutionTrace());
sc.getFixtures().add(new VerifyFact("c1",
ls(new VerifyField("type",
"XXX",
"=="))));
sc.getFixtures().add(new RetractFact("c2"));
sc.getFixtures().add(new ExecutionTrace());
sc.getFixtures().add(new VerifyFact("c1",
ls(new VerifyField("type",
"rule4",
"=="))));
KieSession ksession = getKieSession("test_stateful.drl");
ScenarioRunner run = new ScenarioRunner(ksession);
run.run(sc);
assertTrue(sc.wasSuccessful());
}