use of com.yahoo.test.ArraytypesConfig in project vespa by vespa-engine.
the class UserConfigBuilderTest method require_that_arrays_config_is_resolved.
@Test
public void require_that_arrays_config_is_resolved() throws ParserConfigurationException, IOException, SAXException {
Element configRoot = getDocument("<config name=\"arraytypes\">" + " <intarr operation=\"append\">13</intarr>" + " <intarr operation=\"append\">10</intarr>" + " <intarr operation=\"append\">1337</intarr>" + "</config>");
UserConfigRepo map = UserConfigBuilder.build(configRoot, configDefinitionStore, new BaseDeployLogger());
assertFalse(map.isEmpty());
ConfigDefinitionKey key = new ConfigDefinitionKey("arraytypes", "config");
assertNotNull(map.get(key));
ArraytypesConfig config = createConfig(ArraytypesConfig.class, map.get(key));
assertThat(config.intarr().size(), is(3));
assertThat(config.intarr(0), is(13));
assertThat(config.intarr(1), is(10));
assertThat(config.intarr(2), is(1337));
}
Aggregations