use of org.drools.tms.beliefsystem.jtms.JTMSBeliefSystem in project drools by kiegroup.
the class JTMSTest method testConflictStrict.
@Test(timeout = 10000)
public void testConflictStrict() {
KieSession kSession = getSessionFromFile("posNegConflict.drl");
ArrayList list = new ArrayList();
kSession.setGlobal("list", list);
NamedEntryPoint ep = (NamedEntryPoint) ((StatefulKnowledgeSessionImpl) kSession).getEntryPoint("DEFAULT");
JTMSBeliefSystem bs = (JTMSBeliefSystem) ((TruthMaintenanceSystemImpl) TruthMaintenanceSystemFactory.get().getOrCreateTruthMaintenanceSystem(ep)).getBeliefSystem();
bs.STRICT = true;
try {
kSession.fireAllRules();
fail("A fact and its negation should have been asserted, but no exception was trhown in strict mode");
} catch (Exception e) {
} finally {
bs.STRICT = false;
}
}
Aggregations