use of de.prob.model.brules.RuleResult.CounterExample in project prob2 by bendisposto.
the class RulesMachineTest method testCounterExample.
@Test
public void testCounterExample() {
RulesMachineRun rulesMachineRun = startRulesMachineRunWithOperations("RULE foo BODY RULE_FAIL ERROR_TYPE 1 COUNTEREXAMPLE \"error\"END END");
assertEquals(null, rulesMachineRun.getFirstError());
RuleResult ruleResult = rulesMachineRun.getRuleResults().getRuleResult("foo");
List<CounterExample> counterExamples = ruleResult.getCounterExamples();
assertEquals(1, counterExamples.size());
CounterExample counterExample = counterExamples.get(0);
assertEquals(1, counterExample.getErrorType());
}
Aggregations