This commit is contained in:
2026-09-29 18:06:18 +08:00
parent 54ad26c607
commit 2c60a29e0f
30 changed files with 384 additions and 139 deletions
@@ -27,6 +27,7 @@ class DirectEventClientTest {
@Test void feeIsSentOnlyToFinance() {
var event = event(EventTypes.BUSINESS_FEE_SOURCE_CHANGED);
when(finance.fee("token", event)).thenReturn(ApiResponse.success(DeliveryAck.of(event, DeliveryAck.Outcome.APPLIED)));
client.receive("token", event);
verify(finance).fee("token", event);
verifyNoMoreInteractions(finance);
@@ -45,7 +46,7 @@ class DirectEventClientTest {
@Test void unsupportedEventsHaveNoDefaultDestination() {
assertThatThrownBy(() -> client.receive("token", event(EventTypes.WALLET_COMMAND_COMPLETED)))
.isInstanceOf(IllegalArgumentException.class).hasMessageContaining("Unsupported outbound");
.isInstanceOf(com.baiyue.common.web.EventDeliveryFailure.class).hasMessageContaining("Unsupported outbound");
verifyNoInteractions(firstleg, finance);
}