use of org.activiti.api.process.model.BPMNSignal in project Activiti by Activiti.
the class ToSignalConverterTest method fromShouldSetMetaInfoAndVariables.
@Test
public void fromShouldSetMetaInfoAndVariables() {
// given
ActivitiSignalEventImpl internalEvent = new ActivitiSignalEventImpl(ActivitiEventType.ACTIVITY_SIGNALED);
internalEvent.setSignalName("go");
internalEvent.setSignalData(singletonMap("signalVar", "value"));
internalEvent.setProcessDefinitionId("procDefId");
internalEvent.setProcessInstanceId("procInstId");
// when
BPMNSignal signal = toSignalConverter.from(internalEvent);
// then
assertThat(signal.getSignalPayload().getName()).isEqualTo("go");
assertThat(signal.getSignalPayload().getVariables()).containsEntry("signalVar", "value");
assertThat(signal.getProcessDefinitionId()).isEqualTo("procDefId");
assertThat(signal.getProcessInstanceId()).isEqualTo("procInstId");
}
Aggregations