|
116 | 116 | import com.ibm.watson.discovery.v1.model.QueryPassages; |
117 | 117 | import com.ibm.watson.discovery.v1.model.QueryResponse; |
118 | 118 | import com.ibm.watson.discovery.v1.model.Term; |
119 | | -import com.ibm.watson.discovery.v1.model.TestConfigurationInEnvironmentOptions; |
120 | | -import com.ibm.watson.discovery.v1.model.TestDocument; |
121 | 119 | import com.ibm.watson.discovery.v1.model.Timeslice; |
122 | 120 | import com.ibm.watson.discovery.v1.model.TokenDictRule; |
123 | 121 | import com.ibm.watson.discovery.v1.model.TokenDictStatusResponse; |
@@ -1326,44 +1324,6 @@ public void queryNoticesCountIsSuccessful() { |
1326 | 1324 | assertTrue(queryResponse.getResults().size() <= 5); |
1327 | 1325 | } |
1328 | 1326 |
|
1329 | | - // Tests for testConfigurationInEnvironment |
1330 | | - |
1331 | | - @Test |
1332 | | - public void testConfigurationInEnvironmentIsSuccessful() { |
1333 | | - Configuration testConfig = createTestConfig(); |
1334 | | - String myDocumentJson = "{\"field\":\"value2\"}"; |
1335 | | - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); |
1336 | | - TestConfigurationInEnvironmentOptions options = new TestConfigurationInEnvironmentOptions.Builder(environmentId) |
1337 | | - .configurationId(testConfig.configurationId()) |
1338 | | - .file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON) |
1339 | | - .filename("test_file") |
1340 | | - .build(); |
1341 | | - TestDocument testResponse = discovery.testConfigurationInEnvironment(options).execute().getResult(); |
1342 | | - assertNotNull(testResponse); |
1343 | | - assertEquals(0, testResponse.getNotices().size()); |
1344 | | - } |
1345 | | - |
1346 | | - @Test |
1347 | | - public void testConfigurationInEnvironmentWithAllOptionsIsSuccessful() { |
1348 | | - Configuration testConfig = createTestConfig(); |
1349 | | - String myDocumentJson = "{\"field\":\"value2\"}"; |
1350 | | - InputStream documentStream = new ByteArrayInputStream(myDocumentJson.getBytes()); |
1351 | | - JsonObject myMetadata = new JsonObject(); |
1352 | | - myMetadata.add("foo", new JsonPrimitive("bar")); |
1353 | | - |
1354 | | - TestConfigurationInEnvironmentOptions.Builder builder = new TestConfigurationInEnvironmentOptions.Builder(); |
1355 | | - builder.environmentId(environmentId); |
1356 | | - builder.configurationId(testConfig.configurationId()); |
1357 | | - builder.step(TestConfigurationInEnvironmentOptions.Step.HTML_OUTPUT); |
1358 | | - builder.file(documentStream).fileContentType(HttpMediaType.APPLICATION_JSON); |
1359 | | - builder.filename("test_file"); |
1360 | | - builder.metadata(myMetadata.toString()); |
1361 | | - TestDocument testResponse = discovery.testConfigurationInEnvironment(builder.build()).execute().getResult(); |
1362 | | - |
1363 | | - assertNotNull(testResponse); |
1364 | | - assertEquals(0, testResponse.getNotices().size()); |
1365 | | - } |
1366 | | - |
1367 | 1327 | // Tests for reported issues |
1368 | 1328 |
|
1369 | 1329 | @Test |
|
0 commit comments