Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Add TypedPublishedEvents.matchingMapped(…) #126

@odrotbohm

Description

@odrotbohm

As the constraints to select events for verification are usually focused on the event's payload it would be nice if there was API to easily map to the content and register a Predicate on that to filter the owning event.

class SomeEvent {
  Payload payload;
}

// Before
events.ofType(SomeEvent.class).matching(it -> it.getPayload().equals(reference));

// After
events.ofType(SomeEvent.class).matchingMapped(SomeEvent::getPayload, reference::equals);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions