Skip to content

Commit 3265bb4

Browse files
Updating test
1 parent cd280ad commit 3265bb4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/java/com/bandwidth/sdk/api/CallsApiTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,21 @@ public void createCallForbidden() throws ApiException {
194194
assertThat(exception.getCode(), is(403));
195195
}
196196

197+
@Test
198+
public void getCalls() throws ApiException {
199+
Basic.setUsername(BW_USERNAME);
200+
Basic.setPassword(BW_PASSWORD);
201+
202+
ApiResponse<List<CallState>> response = api.listCallsWithHttpInfo(BW_ACCOUNT_ID, USER_NUMBER, BW_NUMBER);
203+
204+
assertThat(response.getStatusCode(), is(200));
205+
assertThat(response.getData(), hasProperty("callId", is(instanceOf(String.class))));
206+
assertThat(response.getData(), hasProperty("accountId", is(BW_ACCOUNT_ID)));
207+
assertThat(response.getData(), hasProperty("applicationId", is(BW_VOICE_APPLICATION_ID)));
208+
assertThat(response.getData(), hasProperty("to", is(USER_NUMBER)));
209+
assertThat(response.getData(), hasProperty("from", is(BW_NUMBER)));
210+
}
211+
197212
// @Test
198213
// @Order(2)
199214
// public void getCallState() throws ApiException, InterruptedException {

0 commit comments

Comments
 (0)