Skip to content

Commit 370607e

Browse files
committed
fix: convert remaining Mockito verify calls to event assertions in FulfillmentServiceIT
1 parent 727f461 commit 370607e

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

src/test/java/io/k2dv/garden/fulfillment/service/FulfillmentServiceIT.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -328,18 +328,8 @@ void update_cancelledFulfillment_doesNotSendShippingOrDeliveredNotification() {
328328
fulfillmentService.update(order.getId(), f.id(),
329329
new UpdateFulfillmentRequest(FulfillmentStatus.CANCELLED, null, null, null, null));
330330

331-
verify(emailService, never()).sendShippingNotification(
332-
eq(adminUser.getEmail()),
333-
eq("#" + order.getId().toString().substring(0, 8).toUpperCase()),
334-
eq("T-CANCEL"),
335-
isNull(),
336-
isNull(),
337-
eq("http://localhost:3000"));
338-
verify(emailService, never()).sendOrderDelivered(
339-
eq(adminUser.getEmail()),
340-
eq("#" + order.getId().toString().substring(0, 8).toUpperCase()),
341-
isNull(),
342-
eq("http://localhost:3000"));
331+
assertThat(applicationEvents.stream(FulfillmentShippedEvent.class).count()).isZero();
332+
assertThat(applicationEvents.stream(FulfillmentDeliveredEvent.class).count()).isZero();
343333
}
344334

345335
@Test

0 commit comments

Comments
 (0)