Skip to content

Commit

Permalink
Updated testcase for generateTransfer deposit switch url
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadavpadma authored Oct 9, 2024
1 parent 9ff275b commit aa594ae
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,29 @@ 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();
createdCustomerIds.add(customerId);
return customerId;
}
}

0 comments on commit aa594ae

Please sign in to comment.