use of org.drools.compiler.integrationtests.facts.TestEvent in project drools by kiegroup.
the class StarImportTest method starImportedFactAlsoDeclaredInDRL.
/**
* Tests that rule fires if given a fact that is imported using
* "star" import, while it is also declared in DRL.
*/
@Test
public void starImportedFactAlsoDeclaredInDRL() throws Exception {
AgendaEventListener ael = mock(AgendaEventListener.class);
ksession.addEventListener(ael);
ksession.insert(new TestEvent("event 1"));
ksession.fireAllRules();
// the rule should have fired exactly once
verify(ael, times(1)).afterMatchFired(any(AfterMatchFiredEvent.class));
}
Aggregations