diff --git a/tests/src/test/java/com/mastercard/openbanking/client/api/ConnectApiTest.java b/tests/src/test/java/com/mastercard/openbanking/client/api/ConnectApiTest.java index 70390e3..fbcf5c0 100644 --- a/tests/src/test/java/com/mastercard/openbanking/client/api/ConnectApiTest.java +++ b/tests/src/test/java/com/mastercard/openbanking/client/api/ConnectApiTest.java @@ -206,6 +206,24 @@ void verifyMicroDepositEntryTest() { fail(e); } } + + @Test + void generateConnectTransferDepositUrlTest() { + try { + var params = new TransferDepositSwitchParameters() + .customerId(CUSTOMER_ID) + .partnerId(PARTNER_ID) + .addAccountsItem(ModelFactory.newDepositSwitchAccount("7526894126", "110000000", "checking")); + var connectUrl = api.generateTransferDepositSwitchUrl(params); + var link = connectUrl.getLink(); + assertTrue(link.contains("type=transferDepositSwitch")); + assertTrue(link.contains("customerId=" + CUSTOMER_ID)); + assertTrue(link.contains("partnerId=" + PARTNER_ID)); + } catch (ApiException e) { + fail(e); + } + } + private static String createTestCustomer() throws ApiException { var customer = customersApi.addTestingCustomer(ModelFactory.newCustomer()); var customerId = customer.getId(); @@ -213,3 +231,4 @@ private static String createTestCustomer() throws ApiException { return customerId; } } +