Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
brianluisgomez committed May 21, 2024
1 parent 977709e commit 65af03e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ public void getAndDeleteRealTimeTranscriptionsTest() throws ApiException, Interr
TimeUnit.SECONDS.sleep(TEST_SLEEP);
ApiResponse<CreateCallResponse> createCallResponse = callsApi.createCallWithHttpInfo(BW_ACCOUNT_ID, createMantecaCallBody);


String callId = createCallResponse.getData().getCallId();
assertThat(createCallResponse.getStatusCode(), is(201));

// Redirect call to different url
TimeUnit.SECONDS.sleep(TEST_SLEEP);
ApiResponse<Void> updateCallResponse = callsApi.updateCallBxmlWithHttpInfo(BW_ACCOUNT_ID,
createCallResponse.getData().getCallId(), bxmlBody);
ApiResponse<Void> updateCallResponse = callsApi.updateCallBxmlWithHttpInfo(BW_ACCOUNT_ID, callId, bxmlBody);

assertThat(updateCallResponse.getStatusCode(), is(204));

Expand All @@ -107,10 +108,10 @@ public void getAndDeleteRealTimeTranscriptionsTest() throws ApiException, Interr
// The Transcriptions API tests start here
ApiResponse<List<CallTranscriptionMetadata>> listRealTimeTranscriptionResponse = transcriptionsApi.listRealTimeTranscriptionsWithHttpInfo(BW_ACCOUNT_ID, createCallResponse.getData().getCallId());

String transcriptionId = listRealTimeTranscriptionResponse.getData().get(0).getTranscriptionId();
String transcriptionId = listRealTimeTranscriptionResponse.getData().toString();
TimeUnit.SECONDS.sleep(TEST_SLEEP);

ApiResponse<CallTranscriptionResponse> getRealTimeTranscriptionResponse = transcriptionsApi.getRealTimeTranscriptionWithHttpInfo(BW_ACCOUNT_ID, createCallResponse.getData().getCallId(), transcriptionId);
ApiResponse<CallTranscriptionResponse> getRealTimeTranscriptionResponse = transcriptionsApi.getRealTimeTranscriptionWithHttpInfo(BW_ACCOUNT_ID, callId, transcriptionId);

assertThat(getRealTimeTranscriptionResponse.getStatusCode(), is(200));
assertThat(getRealTimeTranscriptionResponse.getData(), hasProperty("transcriptId", is(instanceOf(String.class))));
Expand Down

0 comments on commit 65af03e

Please sign in to comment.