use of com.ibm.watson.developer_cloud.speech_to_text.v1.model.DeleteCorpusOptions in project java-sdk by watson-developer-cloud.
the class SpeechToTextTest method testDeleteCorpus.
/**
* Test delete corpus.
*
* @throws InterruptedException the interrupted exception
* @throws FileNotFoundException the file not found exception
*/
@Test
public void testDeleteCorpus() throws InterruptedException, FileNotFoundException {
String id = "foo";
String corpus = "cName";
server.enqueue(new MockResponse().addHeader(CONTENT_TYPE, HttpMediaType.APPLICATION_JSON).setBody("{}"));
DeleteCorpusOptions deleteOptions = new DeleteCorpusOptions.Builder().customizationId(id).corpusName(corpus).build();
service.deleteCorpus(deleteOptions).execute();
final RecordedRequest request = server.takeRequest();
assertEquals("DELETE", request.getMethod());
assertEquals(String.format(PATH_CORPUS, id, corpus), request.getPath());
}
Aggregations