use of datawave.data.type.DateType in project datawave by NationalSecurityAgency.
the class ShardQueryConfigurationTest method testGetSetIndexedFieldDataTypes.
@Test
public void testGetSetIndexedFieldDataTypes() {
Assert.assertEquals("", config.getIndexedFieldDataTypesAsString());
Set<String> indexedFields = Sets.newHashSet("fieldA", "fieldB");
Multimap<String, Type<?>> queryFieldsDatatypes = ArrayListMultimap.create();
queryFieldsDatatypes.put("fieldA", new DateType());
queryFieldsDatatypes.put("fieldB", new StringType());
config.setIndexedFields(indexedFields);
config.setQueryFieldsDatatypes(queryFieldsDatatypes);
String expected = "fieldA:datawave.data.type.DateType;fieldB:datawave.data.type.StringType;";
Assert.assertEquals(expected, config.getIndexedFieldDataTypesAsString());
}
use of datawave.data.type.DateType in project datawave by NationalSecurityAgency.
the class ShardQueryConfigurationTest method testGetSetNormalizedFieldNormalizers.
@Test
public void testGetSetNormalizedFieldNormalizers() {
Assert.assertEquals("", config.getNormalizedFieldNormalizersAsString());
Set<String> normalizedFields = Sets.newHashSet("fieldA", "fieldB");
Multimap<String, Type<?>> normalizedFieldsDatatypes = ArrayListMultimap.create();
normalizedFieldsDatatypes.put("fieldA", new DateType());
normalizedFieldsDatatypes.put("fieldB", new StringType());
config.setIndexedFields(normalizedFields);
config.setNormalizedFieldsDatatypes(normalizedFieldsDatatypes);
String expected = "fieldA:datawave.data.type.DateType;fieldB:datawave.data.type.StringType;";
Assert.assertEquals(expected, config.getNormalizedFieldNormalizersAsString());
}
Aggregations