@Test public void shouldParseCorrectly() { ConstrettoConfiguration conf = new ConstrettoBuilder() .createYamlConfigurationStore() .addResource(Resource.create("classpath:yamlTest.yaml"), "person") .done() .getConfiguration(); Person person = conf.evaluateWith(new PersonJsonConverter(), "person"); assertEquals(new Person("Kaare", 29), person); }
public YamlStore addResource(Resource resource, String key, String... tags) { List<String> tagList = new ArrayList<String>(); addAll(tagList, tags); return new YamlStore(this, key, new TaggedResource(resource, tagList)); }
YamlStore implements ConfigurationStore { public YamlStore addResource(Resource resource, String key, String... tags) { List<String> tagList = new ArrayList<String>(); addAll(tagList, tags); return new YamlStore(this, key, new TaggedResource(resource, tagList)); } }
YamlStore implements ConfigurationStore { public YamlStore addResource(Resource resource, String key, String... tags) { List<String> tagList = new ArrayList<String>(); addAll(tagList, tags); return new YamlStore(this, key, new TaggedResource(resource, tagList)); } YamlStore(); private  YamlStore(YamlStore old, String key, TaggedResource resource); }
YamlStore implements ConfigurationStore { public YamlStore addResource(Resource resource, String key, String... tags) { List<String> tagList = new ArrayList<String>(); addAll(tagList, tags); return new YamlStore(this, key, new TaggedResource(resource, tagList)); } YamlStore(); private  YamlStore(YamlStore old, String key, TaggedResource resource); YamlStore addResource(Resource resource, String key, String... tags); Collection<TaggedPropertySet> parseConfiguration(); }
YamlStore implements ConfigurationStore { public YamlStore addResource(Resource resource, String key, String... tags) { List<String> tagList = new ArrayList<String>(); addAll(tagList, tags); return new YamlStore(this, key, new TaggedResource(resource, tagList)); } YamlStore(); private  YamlStore(YamlStore old, String key, TaggedResource resource); YamlStore addResource(Resource resource, String key, String... tags); Collection<TaggedPropertySet> parseConfiguration(); static final Charset DEFAULT_CHARSET; }