优化
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user