Search in sources :

Example 1 with DeleteAllTrainingDataOptions

use of com.ibm.watson.developer_cloud.discovery.v1.model.DeleteAllTrainingDataOptions in project java-sdk by watson-developer-cloud.

the class DiscoveryServiceTest method deleteAllCollectionTrainingDataIsSuccessful.

@Test
public void deleteAllCollectionTrainingDataIsSuccessful() throws InterruptedException {
    MockResponse desiredResponse = new MockResponse().setResponseCode(204);
    server.enqueue(desiredResponse);
    DeleteAllTrainingDataOptions deleteRequest = new DeleteAllTrainingDataOptions.Builder(environmentId, collectionId).build();
    discoveryService.deleteAllTrainingData(deleteRequest).execute();
    RecordedRequest request = server.takeRequest();
    assertEquals(TRAINING1_PATH, request.getPath());
    assertEquals(DELETE, request.getMethod());
}
Also used : RecordedRequest(okhttp3.mockwebserver.RecordedRequest) MockResponse(okhttp3.mockwebserver.MockResponse) DeleteAllTrainingDataOptions(com.ibm.watson.developer_cloud.discovery.v1.model.DeleteAllTrainingDataOptions) WatsonServiceUnitTest(com.ibm.watson.developer_cloud.WatsonServiceUnitTest) Test(org.junit.Test)

Aggregations

WatsonServiceUnitTest (com.ibm.watson.developer_cloud.WatsonServiceUnitTest)1 DeleteAllTrainingDataOptions (com.ibm.watson.developer_cloud.discovery.v1.model.DeleteAllTrainingDataOptions)1 MockResponse (okhttp3.mockwebserver.MockResponse)1 RecordedRequest (okhttp3.mockwebserver.RecordedRequest)1 Test (org.junit.Test)1