use of com.ibm.watson.discovery.v1.model.NormalizationOperation in project java-sdk by watson-developer-cloud.
the class DiscoveryServiceIT method issueNumber518.
@Test
public void issueNumber518() {
String[] operations = new String[] { Operation.MOVE, Operation.COPY, Operation.MERGE, Operation.REMOVE, Operation.REMOVE_NULLS };
String uniqueConfigName = uniqueName + "-config";
CreateConfigurationOptions.Builder createBuilder = new CreateConfigurationOptions.Builder(environmentId);
Configuration configuration = getTestConfiguration(DISCOVERY2_TEST_CONFIG_FILE);
configuration.setName(uniqueConfigName);
createBuilder.configuration(configuration);
Configuration createResponse = createConfiguration(createBuilder.build());
GetConfigurationOptions getOptions = new GetConfigurationOptions.Builder(environmentId, createResponse.getConfigurationId()).build();
Configuration getResponse = discovery.getConfiguration(getOptions).execute();
// verify getResponse deserializes the operations appropriately
for (NormalizationOperation normalization : getResponse.getNormalizations()) {
String operation = normalization.getOperation();
assertEquals(true, Arrays.asList(operations).contains(operation));
}
}
Aggregations