use of io.spine.server.integration.IntegrationEvent in project core-java by SpineEventEngine.
the class BoundedContextShould method not_notify_integration_event_subscriber_if_event_is_invalid.
@Test
public void not_notify_integration_event_subscriber_if_event_is_invalid() {
final BoundedContext boundedContext = BoundedContext.newBuilder().setMultitenant(true).build();
// Unsupported message.
final Any invalidMsg = AnyPacker.pack(BcProjectCreated.getDefaultInstance());
final IntegrationEvent event = Given.AnIntegrationEvent.projectCreated().toBuilder().setMessage(invalidMsg).build();
final MemoizingObserver<Ack> observer = memoizingObserver();
boundedContext.notify(event, observer);
assertEquals(ERROR, observer.firstResponse().getStatus().getStatusCase());
}
Aggregations