GH-236 - Code fixes in Introducing Spring Modulith document.

Replaced the deprecated matchingMapped with matching, and adapted the way the orderId is read from the event.
This commit is contained in:
Simon Verhoeven
2023-07-09 12:46:02 +02:00
committed by Oliver Drotbohm
parent 0e6d6ab303
commit 0e879640ef

View File

@@ -144,7 +144,7 @@ class OrderIntegrationTests {
// Find all OrderCompleted events referring to our reference order
var matchingMapped = events.ofType(OrderCompleted.class)
.matchingMapped(OrderCompleted::getOrderId, reference.getId()::equals);
.matching(OrderCompleted::orderId, reference.getId());
assertThat(matchingMapped).hasSize(1);
}