use of org.kie.kogito.event.AbstractDataEvent in project kogito-runtimes by kiegroup.
the class CloudEventUtilsTest method testGetAttribute.
@Test
void testGetAttribute() {
AbstractDataEvent event = new AbstractDataEvent("TestType", "source", null, "kogitoProcessinstanceId", "kogitoRootProcessId", "kogitoProcessId", "kogitoRootProcessId", "kogitoAddons") {
};
assertThat(CloudEventUtils.getAttribute("type", event)).isEqualTo("TestType");
assertThat(CloudEventUtils.getAttribute("source", event)).isInstanceOf(URI.class);
assertThat(CloudEventUtils.getAttribute("data", event)).isNull();
assertThat(CloudEventUtils.getAttribute("wrongValue", event)).isNull();
}
Aggregations