Search in sources :

Example 1 with DeleteConfigurationOptions

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

the class DiscoveryServiceIT method deleteConfigurationIsSuccessful.

@Test
public void deleteConfigurationIsSuccessful() {
    Configuration createResponse = createTestConfig();
    DeleteConfigurationOptions deleteOptions = new DeleteConfigurationOptions.Builder(environmentId, createResponse.getConfigurationId()).build();
    deleteConfiguration(deleteOptions);
}
Also used : Configuration(com.ibm.watson.developer_cloud.discovery.v1.model.Configuration) DeleteConfigurationOptions(com.ibm.watson.developer_cloud.discovery.v1.model.DeleteConfigurationOptions) Test(org.junit.Test) WatsonServiceTest(com.ibm.watson.developer_cloud.WatsonServiceTest)

Example 2 with DeleteConfigurationOptions

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

the class DiscoveryServiceTest method deleteConfigurationIsSuccessful.

@Test
public void deleteConfigurationIsSuccessful() throws InterruptedException {
    server.enqueue(jsonResponse(deleteConfResp));
    DeleteConfigurationOptions deleteRequest = new DeleteConfigurationOptions.Builder(environmentId, configurationId).build();
    discoveryService.deleteConfiguration(deleteRequest).execute();
    RecordedRequest request = server.takeRequest();
    assertEquals(CONF2_PATH, request.getPath());
    assertEquals(DELETE, request.getMethod());
}
Also used : RecordedRequest(okhttp3.mockwebserver.RecordedRequest) DeleteConfigurationOptions(com.ibm.watson.developer_cloud.discovery.v1.model.DeleteConfigurationOptions) WatsonServiceUnitTest(com.ibm.watson.developer_cloud.WatsonServiceUnitTest) Test(org.junit.Test)

Aggregations

DeleteConfigurationOptions (com.ibm.watson.developer_cloud.discovery.v1.model.DeleteConfigurationOptions)2 Test (org.junit.Test)2 WatsonServiceTest (com.ibm.watson.developer_cloud.WatsonServiceTest)1 WatsonServiceUnitTest (com.ibm.watson.developer_cloud.WatsonServiceUnitTest)1 Configuration (com.ibm.watson.developer_cloud.discovery.v1.model.Configuration)1 RecordedRequest (okhttp3.mockwebserver.RecordedRequest)1