|
27 | 27 | import java.net.URISyntaxException;
|
28 | 28 | import java.util.ArrayList;
|
29 | 29 | import java.util.List;
|
| 30 | +import java.time.OffsetDateTime; |
30 | 31 | import java.util.concurrent.TimeUnit;
|
31 | 32 |
|
32 | 33 | import static org.hamcrest.MatcherAssert.assertThat;
|
@@ -61,7 +62,7 @@ public class CallsApiTest {
|
61 | 62 | private static CallbackMethodEnum callbackMethod = CallbackMethodEnum.POST;
|
62 | 63 | private static String testCallId = "Call-Id";
|
63 | 64 | private static String testXmlBody = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Bxml><SpeakSentence locale=\"en_US\" gender=\"female\" voice=\"susan\">This is a test bxml response</SpeakSentence><Pause duration=\"3\"/></Bxml>";
|
64 |
| - private static int TEST_SLEEP = 3; |
| 65 | + private static int TEST_SLEEP = 6; |
65 | 66 |
|
66 | 67 | @BeforeAll
|
67 | 68 | public static void setupBeforeClass() throws URISyntaxException {
|
@@ -202,14 +203,17 @@ public void getCalls() throws ApiException {
|
202 | 203 | ApiResponse<List<CallState>> response = api.listCallsWithHttpInfo(BW_ACCOUNT_ID, USER_NUMBER, BW_NUMBER, null, null, null, null, null);
|
203 | 204 |
|
204 | 205 | assertThat(response.getStatusCode(), is(200));
|
205 |
| - assertThat(response.getData(), is(instanceOf(Array.class))); |
206 |
| - assertThat(response.getData(0), hasProperty("accountId", is(BW_ACCOUNT_ID))); |
207 |
| - assertThat(response.getData(0), hasProperty("applicationId", is(BW_VOICE_APPLICATION_ID))); |
208 |
| - assertThat(response.getData(0), hasProperty("to", is(USER_NUMBER))); |
209 |
| - assertThat(response.getData(0), hasProperty("from", is(BW_NUMBER))); |
210 |
| - assertThat(response.getData(0), hasProperty("callId", is(instanceOf(String.class)))); |
211 |
| - assertThat(response.getData(0), hasProperty("state", is(instanceOf(String.class)))) |
212 |
| - ; |
| 206 | + System.out.println(response.getData()); |
| 207 | + assertThat(response.getData(), is(instanceOf(ArrayList.class))); |
| 208 | + assertThat(response.getData().get(0), hasProperty("accountId", is(instanceOf(String.class)))); |
| 209 | + assertThat(response.getData().get(0), hasProperty("applicationId", is(instanceOf(String.class)))); |
| 210 | + assertThat(response.getData().get(0), hasProperty("callId", is(instanceOf(String.class)))); |
| 211 | + assertThat(response.getData().get(0), hasProperty("state", is(instanceOf(String.class)))); |
| 212 | + assertThat(response.getData().get(0), hasProperty("direction", is(instanceOf(CallDirectionEnum.class)))); |
| 213 | + assertThat(response.getData().get(0), hasProperty("startTime", is(instanceOf(OffsetDateTime.class)))); |
| 214 | + assertThat(response.getData().get(0), hasProperty("endTime", is(instanceOf(OffsetDateTime.class)))); |
| 215 | + assertThat(response.getData().get(0), hasProperty("errorMessage", is(instanceOf(String.class)))); |
| 216 | + assertThat(response.getData().get(0), hasProperty("errorId", is(instanceOf(String.class)))); |
213 | 217 |
|
214 | 218 | }
|
215 | 219 |
|
|
0 commit comments