Skip to content

Commit 400baf4

Browse files
Adding more asserts
1 parent 41d73c7 commit 400baf4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class TranscriptionsApiTest {
6767
private static CreateCall createMantecaCallBody = new CreateCall();
6868
private static UpdateCall completeMantecaCallBody = new UpdateCall();
6969
private static URI mantecaAnswerUrl;
70-
private static String bxmlBody = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Bxml><SpeakSentence locale=\"en_US\" gender=\"female\" voice=\"susan\">This is a bxml start transcription test.</SpeakSentence><StartTranscription tracks=\"both\"></StartTranscription><SpeakSentence voice=\"bridget\">Ideally this part is being transcribed.</SpeakSentence><Pause duration=\"3\"/></Bxml>";
70+
private static String bxmlBody = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Bxml><SpeakSentence locale=\"en_US\" gender=\"female\" voice=\"susan\">This is a bxml start transcription test.</SpeakSentence><StartTranscription tracks=\"outbound\"></StartTranscription><SpeakSentence voice=\"bridget\">Ideally this part is being transcribed.</SpeakSentence><Pause duration=\"3\"/></Bxml>";
7171
private static int TEST_SLEEP = 10;
7272
private static int TEST_SLEEP_LONG = 60;
7373

@@ -118,11 +118,13 @@ public void getAndDeleteRealTimeTranscriptionsTest() throws ApiException, Interr
118118

119119
assertThat(getRealTimeTranscriptionResponse.getStatusCode(), is(200));
120120
assertThat(getRealTimeTranscriptionResponse.getData(), hasProperty("transcriptionId", is(instanceOf(String.class))));
121+
assertThat(getRealTimeTranscriptionResponse.getData().getTracks(), hasProperty("track", is("outbound")));
122+
assertThat(getRealTimeTranscriptionResponse.getData().getTracks(), hasProperty("confidence", is(instanceOf(String.class))));
121123

122124

123125
ApiResponse<Void> deleteRealTimeTranscriptionResponse = transcriptionsApi.deleteRealTimeTranscriptionWithHttpInfo(BW_ACCOUNT_ID, createCallResponse.getData().getCallId(), transcriptionId);
124126

125-
assertThat(deleteRealTimeTranscriptionResponse.getStatusCode(), is(200));
127+
assertThat(deleteRealTimeTranscriptionResponse.getStatusCode(), is(200)); // This should be 204 but there is currently a bug in the API to be fixed in VAPI-1863
126128

127129
}
128130
}

0 commit comments

Comments
 (0)