use of com.yahoo.test.SimpletypesConfig in project vespa by vespa-engine.
the class Federation2Test method testProviderConfigs.
@Test
public void testProviderConfigs() {
// SimpletypesConfig testConfig = root.getConfig(SimpletypesConfig.class, "test/searchchains/chain/chain1/component/com.yahoo.example.TestSearcher");
// assertEquals("testSearcher",testConfig.stringval());
SimpletypesConfig configA = root.getConfig(SimpletypesConfig.class, "searchchains/chain/providerA/source/commonSource/component/com.yahoo.example.AddHitSearcher");
assertEquals("providerA", configA.stringval());
SimpletypesConfig configB = root.getConfig(SimpletypesConfig.class, "searchchains/chain/providerB/source/commonSource/component/com.yahoo.example.AddHitSearcher");
assertEquals("providerB", configB.stringval());
}
use of com.yahoo.test.SimpletypesConfig in project vespa by vespa-engine.
the class UserConfigBuilderTest method require_that_simple_config_is_resolved.
@Test
public void require_that_simple_config_is_resolved() throws ParserConfigurationException, IOException, SAXException {
Element configRoot = getDocument("<config name=\"simpletypes\">" + " <intval>13</intval>" + "</config>" + "<config name=\"simpletypes\" version=\"1\">" + " <stringval>foolio</stringval>" + "</config>");
UserConfigRepo map = UserConfigBuilder.build(configRoot, configDefinitionStore, new BaseDeployLogger());
assertFalse(map.isEmpty());
ConfigDefinitionKey key = new ConfigDefinitionKey("simpletypes", "config");
assertNotNull(map.get(key));
SimpletypesConfig config = createConfig(SimpletypesConfig.class, map.get(key));
assertThat(config.intval(), is(13));
assertThat(config.stringval(), is("foolio"));
}
Aggregations