Package org.constretto.model

Examples of org.constretto.model.ClassPathResource


    @Test
    public void youShouldBeAbleToGetCurrentEnvironmentTroughTheAPI() {
        ConstrettoConfiguration configuration = new ConstrettoBuilder(false)
                .createPropertiesStore()
                .addResource(new ClassPathResource("test.properties"))
                .done()
                .getConfiguration();
        assertEquals(0, configuration.getCurrentTags().size());
        configuration.prependTag("dev");
        assertEquals(1, configuration.getCurrentTags().size());
View Full Code Here


    @Test
    public void iteratingSimplePropertiesShouldWork() {
        ConstrettoConfiguration configuration = new ConstrettoBuilder(false)
                .createPropertiesStore()
                .addResource(new ClassPathResource("test.properties"))
                .done()
                .addCurrentTag("production")
                .getConfiguration();
        List<String>props = new ArrayList<String>();
        for (Property property : configuration) {
View Full Code Here

    @Test
    public void iteratingPropertiesContainingArraysAndMapsShouldWork() {
        ConstrettoConfiguration configuration = new ConstrettoBuilder(false)
                .createPropertiesStore()
                .addResource(new ClassPathResource("test-with-array-and-map.properties"))
                .done()
                .getConfiguration();
        List<String>props = new ArrayList<String>();
        for (Property property : configuration) {
            String propString = property.getKey() + " = " + property.getValue();
View Full Code Here

TOP

Related Classes of org.constretto.model.ClassPathResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.