Search in sources :

Example 1 with ProjectStarted

use of io.spine.test.event.ProjectStarted in project core-java by SpineEventEngine.

the class EventEnricherShould method enrich_event_if_enrichment_definition_is_enclosed_to_event.

@Test
public void enrich_event_if_enrichment_definition_is_enclosed_to_event() {
    final ProjectStarted msg = GivenEventMessage.projectStarted();
    final Event event = createEvent(msg);
    eventBus.post(event);
    assertEquals(getProjectName.apply(msg.getProjectId()), subscriber.projectStartedEnrichment.getProjectName());
}
Also used : ProjectStarted(io.spine.test.event.ProjectStarted) Event(io.spine.core.Event) GivenEvent(io.spine.server.event.given.EventEnricherTestEnv.GivenEvent) Test(org.junit.Test)

Example 2 with ProjectStarted

use of io.spine.test.event.ProjectStarted in project core-java by SpineEventEngine.

the class EventEnricherShould method enrich_event_if_enrichment_definition_is_enclosed_to_event.

@Test
public void enrich_event_if_enrichment_definition_is_enclosed_to_event() {
    final ProjectStarted msg = Given.EventMessage.projectStarted();
    eventBus.post(createEvent(msg));
    assertEquals(getProjectName.apply(msg.getProjectId()), subscriber.projectStartedEnrichment.getProjectName());
}
Also used : ProjectStarted(io.spine.test.event.ProjectStarted) Test(org.junit.Test)

Aggregations

ProjectStarted (io.spine.test.event.ProjectStarted)2 Test (org.junit.Test)2 Event (io.spine.core.Event)1 GivenEvent (io.spine.server.event.given.EventEnricherTestEnv.GivenEvent)1