public class LanguageTranslationTest extends WatsonServiceUnitTest
DELETE, GET, POST, PUT, server
CONTENT_TYPE, PLACEHOLDER, properties
Constructor and Description |
---|
LanguageTranslationTest() |
Modifier and Type | Method and Description |
---|---|
void |
setUp()
Setups and starts the mock server.
|
void |
testcreateModelWithBaseModelNull()
Test create model with base model null.
|
void |
testcreateModelWithGlossaryNull()
Test create model with glossary null.
|
void |
testDeleteWithNull()
Test delete with null.
|
void |
testGetIdentifiableLanguages()
Test Get Identifiable languages.
|
void |
testGetModel()
Test Get Model.
|
void |
testGetModels()
Test Get Models.
|
void |
testGetModelWithNull()
Test get model with null.
|
void |
testIdentify()
Test Identify.
|
void |
testTranslate()
Test translate.
|
void |
testTranslateMultiple()
Test translate multiple texts.
|
void |
testTranslateNotSupported()
Test Translate with an invalid model.
|
void |
testTranslateWithNull()
Test translate with null.
|
getMockWebServerUrl, jsonResponse, tearDown
getDefaultHeaders, getProperty, getStringFromInputStream, loadFixture, writeInputStreamToFile
public void setUp() throws java.lang.Exception
WatsonServiceUnitTest
setUp
in class WatsonServiceUnitTest
java.lang.Exception
- the exceptionpublic void testcreateModelWithBaseModelNull()
public void testcreateModelWithGlossaryNull()
public void testDeleteWithNull()
public void testGetIdentifiableLanguages() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testGetModel() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testGetModels() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testGetModelWithNull()
public void testIdentify() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testTranslate() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testTranslateMultiple() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testTranslateNotSupported()
public void testTranslateWithNull()