martinweiler commented on code in PR #3641:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3641#discussion_r1739401510
##########
jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/StandaloneBPMNProcessTest.java:
##########
@@ -783,16 +830,19 @@ public void testSignalEnd() {
}
@Test
- public void testMessageStart() throws Exception {
- kruntime =
createKogitoProcessRuntime("org/jbpm/bpmn2/start/BPMN2-MessageStart.bpmn2");
- final List<String> list = new ArrayList<>();
- kruntime.getProcessEventManager().addEventListener(new
DefaultKogitoProcessEventListener() {
- public void afterProcessStarted(ProcessStartedEvent event) {
- list.add(((KogitoProcessInstance)
event.getProcessInstance()).getStringId());
+ public void testMessageStart() {
+ Application app = ProcessTestHelper.newApplication();
+ final List<org.kie.kogito.process.ProcessInstance<?>> startedProcesses
= new ArrayList<>();
+ ProcessTestHelper.registerProcessEventListener(app, new
DefaultKogitoProcessEventListener() {
+ @Override
+ public void beforeProcessStarted(ProcessStartedEvent event) {
+ if (event.getProcessInstance() instanceof
org.kie.kogito.process.ProcessInstance) {
+
startedProcesses.add((org.kie.kogito.process.ProcessInstance<?>)
event.getProcessInstance());
+ }
}
});
- kruntime.signalEvent("Message-HelloMessage", "NewValue");
- assertThat(list).hasSize(1);
+ org.kie.kogito.process.Process<MessageStartModel> definition =
MessageStartProcess.newProcess(app);
+ definition.send(Sig.of("HelloMessage", "NewValue"));
Review Comment:
The assert statement is missing in this test
```
- assertThat(list).hasSize(1);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]