Search in sources :

Example 1 with StaticConfigDefinitionRepo

use of com.yahoo.config.model.application.provider.StaticConfigDefinitionRepo in project vespa by vespa-engine.

the class StaticConfigDefinitionRepoTest method testThatRepoIsCorrectlyInitialized.

@Test
public void testThatRepoIsCorrectlyInitialized() throws IOException {
    File topDir = folder.newFolder();
    File defDir = new File(topDir, "classes");
    defDir.mkdir();
    addFile(defDir, new ConfigDefinitionKey("foo", "foons"), "namespace=foons\nval int\n");
    addFile(defDir, new ConfigDefinitionKey("bar", "barns"), "namespace=barns\nval string\n");
    ConfigDefinitionRepo repo = new StaticConfigDefinitionRepo(defDir);
    assertThat(repo.getConfigDefinitions().size(), is(2));
}
Also used : StaticConfigDefinitionRepo(com.yahoo.config.model.application.provider.StaticConfigDefinitionRepo) ConfigDefinitionKey(com.yahoo.vespa.config.ConfigDefinitionKey) File(java.io.File) StaticConfigDefinitionRepo(com.yahoo.config.model.application.provider.StaticConfigDefinitionRepo) ConfigDefinitionRepo(com.yahoo.config.model.api.ConfigDefinitionRepo) Test(org.junit.Test)

Aggregations

ConfigDefinitionRepo (com.yahoo.config.model.api.ConfigDefinitionRepo)1 StaticConfigDefinitionRepo (com.yahoo.config.model.application.provider.StaticConfigDefinitionRepo)1 ConfigDefinitionKey (com.yahoo.vespa.config.ConfigDefinitionKey)1 File (java.io.File)1 Test (org.junit.Test)1