use of com.ibm.watson.developer_cloud.discovery.v1.model.DeleteDocumentOptions in project java-sdk by watson-developer-cloud.
the class DiscoveryServiceTest method deleteDocumentIsSuccessful.
@Test
public void deleteDocumentIsSuccessful() throws InterruptedException {
server.enqueue(jsonResponse(deleteDocResp));
DeleteDocumentOptions deleteRequest = new DeleteDocumentOptions.Builder(environmentId, collectionId, documentId).build();
discoveryService.deleteDocument(deleteRequest).execute();
RecordedRequest request = server.takeRequest();
assertEquals(DOCS2_PATH, request.getPath());
assertEquals(DELETE, request.getMethod());
}
use of com.ibm.watson.developer_cloud.discovery.v1.model.DeleteDocumentOptions in project java-sdk by watson-developer-cloud.
the class DiscoveryServiceIT method deleteDocumentIsSuccessful.
@Test
public void deleteDocumentIsSuccessful() {
Collection collection = createTestCollection();
String collectionId = collection.getCollectionId();
DocumentAccepted documentAccepted = createTestDocument("test_document", collectionId);
DeleteDocumentOptions deleteOptions = new DeleteDocumentOptions.Builder(environmentId, collectionId, documentAccepted.getDocumentId()).build();
discovery.deleteDocument(deleteOptions).execute();
}
Aggregations