Search in sources :

Example 1 with IdentifiableLanguage

use of com.ibm.watson.developer_cloud.language_translator.v2.model.IdentifiableLanguage in project java-sdk by watson-developer-cloud.

the class LanguageTranslatorTest method testGetIdentifiableLanguages.

/**
 * Test Get Identifiable languages.
 *
 * @throws InterruptedException the interrupted exception
 */
@Test
public void testGetIdentifiableLanguages() throws InterruptedException {
    server.enqueue(jsonResponse(identifiableLanguages));
    final List<IdentifiableLanguage> languages = service.listIdentifiableLanguages().execute().getLanguages();
    final RecordedRequest request = server.takeRequest();
    assertEquals(IDENTIFIABLE_LANGUAGES_PATH, request.getPath());
    assertEquals(GSON.toJson(languages), GSON.toJson(identifiableLanguages.get("languages")));
}
Also used : RecordedRequest(okhttp3.mockwebserver.RecordedRequest) IdentifiableLanguage(com.ibm.watson.developer_cloud.language_translator.v2.model.IdentifiableLanguage) WatsonServiceUnitTest(com.ibm.watson.developer_cloud.WatsonServiceUnitTest) Test(org.junit.Test)

Aggregations

WatsonServiceUnitTest (com.ibm.watson.developer_cloud.WatsonServiceUnitTest)1 IdentifiableLanguage (com.ibm.watson.developer_cloud.language_translator.v2.model.IdentifiableLanguage)1 RecordedRequest (okhttp3.mockwebserver.RecordedRequest)1 Test (org.junit.Test)1