use of org.kie.dmn.api.feel.runtime.events.FEELEventListener in project drools by kiegroup.
the class ExtendedFunctionsBaseFEELTest method testExpression.
@Test
public void testExpression() {
FEELEventListener listener = mock(FEELEventListener.class);
feel.addListener(listener);
feel.addListener(evt -> {
System.out.println(evt);
});
assertResult(expression, result);
if (severity != null) {
ArgumentCaptor<FEELEvent> captor = ArgumentCaptor.forClass(FEELEvent.class);
verify(listener, atLeastOnce()).onEvent(captor.capture());
assertThat(captor.getValue().getSeverity(), is(severity));
} else {
verify(listener, never()).onEvent(any(FEELEvent.class));
}
}
Aggregations