-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathExperiencesApiTest.java
39 lines (29 loc) · 1.25 KB
/
ExperiencesApiTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.mastercard.openbanking.client.api;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Arrays;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import com.mastercard.openbanking.client.ApiException;
import com.mastercard.openbanking.client.model.Experiences;
import com.mastercard.openbanking.client.test.BaseTest;
public class ExperiencesApiTest extends BaseTest {
private final ConnectApi api = new ConnectApi(apiClient);
private final static List<String> PRODUCT_CODE = Arrays.asList("ACH","ABC");
private final static String APP_NAME = "TEST";
@Test
public void getAllExperienceTest() throws ApiException {
String appName = APP_NAME;
List<String> productCode = PRODUCT_CODE;
try{
List<Experiences> experiences = api.getAllExperience(appName, productCode);
assertTrue(experiences.size() > 0);
assertNotNull(experiences.get(0));
assertNotNull(experiences.get(0).getProductCode());
assertNotNull(experiences.get(0).getAppName());
} catch (ApiException e) {
Assertions.fail(e);
}
}
}