Fix error in ApplicationEvents example
This commit is contained in:
parent
88af24c1cb
commit
310bdbb1b2
|
|
@ -2613,7 +2613,7 @@ published while invoking a method in a Spring-managed component:
|
||||||
// Invoke method in OrderService that publishes an event
|
// Invoke method in OrderService that publishes an event
|
||||||
orderService.submitOrder(new Order(/* ... */));
|
orderService.submitOrder(new Order(/* ... */));
|
||||||
// Verify that an OrderSubmitted event was published
|
// Verify that an OrderSubmitted event was published
|
||||||
int numEvents = events.stream(OrderSubmitted.class).count(); // <3>
|
long numEvents = events.stream(OrderSubmitted.class).count(); // <3>
|
||||||
assertThat(numEvents).isEqualTo(1);
|
assertThat(numEvents).isEqualTo(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue