public class DocumentConversionTest extends WatsonServiceUnitTest
DELETE, GET, POST, PUT, server
CONTENT_TYPE, PLACEHOLDER, properties
Constructor and Description |
---|
DocumentConversionTest()
Instantiates a new document conversion test.
|
Modifier and Type | Method and Description |
---|---|
void |
setUp()
Setups and starts the mock server.
|
void |
testConvertDocument()
Test convert document.
|
void |
testConvertDocumentWithCustomConfig()
Test convert document_with_custom_config.
|
void |
testConvertDocumentWithMediaType()
Test convert document.
|
void |
testConvertDocumentWithVersionDate()
Test convert document_with_version_date.
|
void |
testIndexDocument()
Test index document.
|
void |
testIndexDocumentDryRun()
Test a dry run of index document with metadata.
|
void |
testIndexDocumentWithFields()
Test index document with fields.
|
void |
testIndexDocumentWithFieldsDryRun()
Test a dry run of index document with metadata and index fields.
|
getMockWebServerUrl, jsonResponse, tearDown
getDefaultHeaders, getProperty, getStringFromInputStream, loadFixture, writeInputStreamToFile
public DocumentConversionTest() throws java.lang.Exception
java.lang.Exception
- the exceptionpublic void setUp() throws java.lang.Exception
WatsonServiceUnitTest
setUp
in class WatsonServiceUnitTest
java.lang.Exception
- the exceptionpublic void testConvertDocument() throws java.net.URISyntaxException, java.io.IOException, java.lang.InterruptedException
java.net.URISyntaxException
- the URI syntax exceptionjava.io.IOException
- Signals that an I/O exception has occurred.java.lang.InterruptedException
- the interrupted exceptionpublic void testConvertDocumentWithMediaType() throws java.net.URISyntaxException, java.io.IOException, java.lang.InterruptedException
java.net.URISyntaxException
- the URI syntax exceptionjava.io.IOException
- Signals that an I/O exception has occurred.java.lang.InterruptedException
- the interrupted exceptionpublic void testConvertDocumentWithCustomConfig() throws java.lang.Exception
java.lang.Exception
- the exceptionpublic void testConvertDocumentWithVersionDate() throws java.lang.Exception
java.lang.Exception
- the exceptionpublic void testIndexDocument() throws java.lang.Exception
java.lang.Exception
- the exceptionpublic void testIndexDocumentWithFields() throws java.lang.Exception
java.lang.Exception
- the exceptionpublic void testIndexDocumentDryRun() throws java.lang.Exception
java.lang.Exception
- the exceptionpublic void testIndexDocumentWithFieldsDryRun() throws java.lang.Exception
java.lang.Exception
- the exception