Skip to content

Commit ad801cd

Browse files
committed
test(speech-to-text): Add tests for new method
1 parent dd5a203 commit ad801cd

3 files changed

Lines changed: 80 additions & 52 deletions

File tree

speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/websocket/SpeechToTextWebSocketListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public final class SpeechToTextWebSocketListener extends WebSocketListener {
5757
private static final String CUSTOMIZATION_ID = "customization_id";
5858
private static final String ACOUSTIC_CUSTOMIZATION_ID = "acoustic_customization_id";
5959
private static final String CUSTOMIZATION_WEIGHT = "customization_weight";
60-
private static final String VERSION = "version";
60+
private static final String VERSION = "base_model_version";
6161

6262
private static final String TIMEOUT_PREFIX = "No speech detected for";
6363

speech-to-text/src/test/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToTextIT.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.ibm.watson.developer_cloud.speech_to_text.v1.model.DeleteAudioOptions;
3434
import com.ibm.watson.developer_cloud.speech_to_text.v1.model.DeleteJobOptions;
3535
import com.ibm.watson.developer_cloud.speech_to_text.v1.model.DeleteLanguageModelOptions;
36+
import com.ibm.watson.developer_cloud.speech_to_text.v1.model.DeleteUserDataOptions;
3637
import com.ibm.watson.developer_cloud.speech_to_text.v1.model.GetAcousticModelOptions;
3738
import com.ibm.watson.developer_cloud.speech_to_text.v1.model.GetAudioOptions;
3839
import com.ibm.watson.developer_cloud.speech_to_text.v1.model.GetCorpusOptions;
@@ -76,6 +77,7 @@
7677
import static org.junit.Assert.assertEquals;
7778
import static org.junit.Assert.assertNotNull;
7879
import static org.junit.Assert.assertTrue;
80+
import static org.junit.Assert.fail;
7981

8082
/**
8183
* Speech to text Integration tests.
@@ -929,4 +931,18 @@ public void testAddAudioArchive() throws FileNotFoundException, InterruptedExcep
929931
service.deleteAcousticModel(deleteAcousticModelOptions).execute();
930932
}
931933
}
934+
935+
@Test
936+
public void testDeleteUserData() {
937+
String customerId = "java_sdk_test_id";
938+
939+
try {
940+
DeleteUserDataOptions deleteOptions = new DeleteUserDataOptions.Builder()
941+
.customerId(customerId)
942+
.build();
943+
service.deleteUserData(deleteOptions);
944+
} catch (Exception ex) {
945+
fail(ex.getMessage());
946+
}
947+
}
932948
}

0 commit comments

Comments
 (0)