Search in sources :

Example 1 with ProjectCompleted

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

the class EventEnricherShould method enrich_several_events_with_same_enrichment_message_with_wildcard_by.

@Test
public void enrich_several_events_with_same_enrichment_message_with_wildcard_by() {
    final ProjectCompleted completed = Given.EventMessage.projectCompleted();
    final ProjectStarred starred = Given.EventMessage.projectStarred();
    final ProjectId completedProjectId = completed.getProjectId();
    final ProjectId starredProjectId = starred.getProjectId();
    eventBus.post(createEvent(completed));
    eventBus.post(createEvent(starred));
    assertEquals(getProjectName.apply(completedProjectId), subscriber.projectCompletedEnrichment.getProjectName());
    assertEquals(getProjectName.apply(starredProjectId), subscriber.projectStarredEnrichment.getProjectName());
}
Also used : ProjectCompleted(io.spine.test.event.ProjectCompleted) ProjectId(io.spine.test.event.ProjectId) ProjectStarred(io.spine.test.event.ProjectStarred) Test(org.junit.Test)

Aggregations

ProjectCompleted (io.spine.test.event.ProjectCompleted)1 ProjectId (io.spine.test.event.ProjectId)1 ProjectStarred (io.spine.test.event.ProjectStarred)1 Test (org.junit.Test)1