public class SpeechToTextTest extends WatsonServiceUnitTest
DELETE, GET, POST, PUT, server
CONTENT_TYPE, PLACEHOLDER, properties
Constructor and Description |
---|
SpeechToTextTest() |
Modifier and Type | Method and Description |
---|---|
void |
setUp()
Setups and starts the mock server.
|
void |
testAddCorpus()
Test add corpus.
|
void |
testAddWord()
Test add word.
|
void |
testAddWords()
Test add words.
|
void |
testClosingInputStreamClosesWebSocket() |
void |
testCreateAndDeleteSession()
Test create and delete session.
|
void |
testCreateCustomization()
Test create customization.
|
void |
testCreateRecognitionJob()
Test create recognition job.
|
void |
testDeleteCorpus()
Test delete corpus.
|
void |
testDeleteCustomization()
Test delete customization.
|
void |
testDeleteRecognitionJob()
Test delete recognition job.
|
void |
testDeleteSessionWithNull()
Test delete session with null.
|
void |
testDeleteWord()
Test delete word.
|
void |
testGetCorpora()
Test get corpora.
|
void |
testGetCorpus()
Test get corpus.
|
void |
testGetCustomization()
Test get customization.
|
void |
testGetCustomizations()
Test get customizations.
|
void |
testGetModel()
Test get model.
|
void |
testGetModels()
Test get models.
|
void |
testGetModelWithNull()
Test get model with null.
|
void |
testGetRecognitionJob()
Test get recognition job.
|
void |
testGetRecognitionJobs()
Test get recognition jobs.
|
void |
testGetWord()
Test get word.
|
void |
testGetWords()
Test get words.
|
void |
testGetWordsSort()
Test get words with sort order alphabetical.
|
void |
testGetWordsType()
Test get words with word type all.
|
void |
testGetWordsTypeSort()
Test get words with word type all and sort order alphabetical.
|
void |
testMediaTypeUtils()
Test MediaTypeUtils class.
|
void |
testPcmWithoutRate()
Test PCM without rate.
|
void |
testPcmWithRate()
Test PCM with rate.
|
void |
testRecognize()
Test recognize.
|
void |
testRecognizeMissingAudioFile()
Test recognize -missing audio file, generate IllegalArgumentException.
|
void |
testRecognizeWithCustomization()
Test recognize with customization.
|
void |
testRecognizeWithSpeakerLabels()
Test diarization.
|
void |
testResetCustomization()
Test reset customization.
|
void |
testTrainCustomization()
Test train customization.
|
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 testCreateAndDeleteSession() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testDeleteSessionWithNull()
public void testPcmWithoutRate()
public void testPcmWithRate()
public void testGetModel() throws java.lang.Exception
java.lang.Exception
- the exceptionpublic void testGetModels() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testGetModelWithNull()
public void testRecognize() throws java.net.URISyntaxException, java.lang.InterruptedException
java.net.URISyntaxException
- the URI syntax exceptionjava.lang.InterruptedException
- the interrupted exceptionpublic void testRecognizeWithSpeakerLabels() throws java.net.URISyntaxException, java.lang.InterruptedException, java.io.FileNotFoundException
java.net.URISyntaxException
- the URI syntax exceptionjava.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testRecognizeWithCustomization() throws java.io.FileNotFoundException, java.lang.InterruptedException
java.io.FileNotFoundException
- the file not found exceptionjava.lang.InterruptedException
- the interrupted exceptionpublic void testRecognizeMissingAudioFile() throws java.net.URISyntaxException, java.lang.InterruptedException
java.net.URISyntaxException
- the URI syntax exceptionjava.lang.InterruptedException
- the interrupted exceptionpublic void testMediaTypeUtils()
public void testDeleteRecognitionJob() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testCreateRecognitionJob() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetRecognitionJob() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetRecognitionJobs() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetCustomizations() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetCustomization() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testCreateCustomization() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testDeleteCustomization() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testTrainCustomization() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testResetCustomization() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetCorpora() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetCorpus() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testDeleteCorpus() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testAddCorpus() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetWords() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetWordsType() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetWordsSort() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetWordsTypeSort() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testGetWord() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testDeleteWord() throws java.lang.InterruptedException
java.lang.InterruptedException
- the interrupted exceptionpublic void testAddWords() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testAddWord() throws java.lang.InterruptedException, java.io.FileNotFoundException
java.lang.InterruptedException
- the interrupted exceptionjava.io.FileNotFoundException
- the file not found exceptionpublic void testClosingInputStreamClosesWebSocket() throws java.lang.Exception
java.lang.Exception