Skip to content

Commit

Permalink
Create TransferApiTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadavpadma authored Oct 9, 2024
1 parent aa594ae commit f359b82
Showing 1 changed file with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.mastercard.openbanking.client.api;

import com.mastercard.openbanking.client.ApiException;
import com.mastercard.openbanking.client.model.DepositSwitchDetails;
import com.mastercard.openbanking.client.model.DepositSwitchesSummary;
import com.mastercard.openbanking.client.test.ModelFactory;
import com.mastercard.openbanking.client.test.BaseTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
import static org.junit.jupiter.api.Assertions.*;


/**
* API tests for TransferApi
*/
@Disabled
class TransferApiTest extends BaseTest{

private final TransferApi api = new TransferApi();

/**
* Get Deposit Switches by Customer ID
*
* Retrieve summary of deposit switches performed by given customer ID. _Supported regions_: ![🇺🇸](https://flagcdn.com/20x15/us.png)
*
* @throws ApiException if the Api call fails
*/
@Test
void getAllDepositSwitchesTest() throws ApiException {
String customerId = CUSTOMER_ID;
DepositSwitchesSummary summary = api.getAllDepositSwitches(customerId);
assertNotNull(summary.getSwitches());
}

/**
* Get Deposit Switch by ID
*
* Retrieve deposit switch details by switch ID. _Supported regions_: ![🇺🇸](https://flagcdn.com/20x15/us.png)
*
* @throws ApiException if the Api call fails
*/
@Test
void getDepositSwitchDetailsTest() throws ApiException {
String customerId = CUSTOMER_ID;
String switchId = ModelFactory.randomStr();
DepositSwitchDetails switchDetails = api.getDepositSwitchDetails(customerId, switchId);
assertNotNull(switchDetails.getSwitchId());
}

}

0 comments on commit f359b82

Please sign in to comment.