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

Add TypedPublishedEvents.matchingMapped(…) #126

Closed
odrotbohm opened this issue Sep 25, 2020 · 0 comments
Closed

Add TypedPublishedEvents.matchingMapped(…) #126

odrotbohm opened this issue Sep 25, 2020 · 0 comments
Assignees
Labels
in: test support Spring Boot integration testing type: enhancement New feature or request
Milestone

Comments

@odrotbohm
Copy link
Collaborator

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);
@odrotbohm odrotbohm added type: enhancement New feature or request in: test support Spring Boot integration testing labels Sep 25, 2020
@odrotbohm odrotbohm added this to the 1.1 M1 milestone Sep 25, 2020
@odrotbohm odrotbohm self-assigned this Sep 25, 2020
@odrotbohm odrotbohm changed the title Add TypedPublishedEvents.matchingMapped(…) Add PublishedEvents.matchingMapped(…) Sep 25, 2020
@odrotbohm odrotbohm changed the title Add PublishedEvents.matchingMapped(…) Add TypedPublishedEvents.matchingMapped(…) Sep 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in: test support Spring Boot integration testing type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant