Package org.geotools.util

Examples of org.geotools.util.InterpolationProperties.interpolate()


        Properties properties = new Properties();
        properties.put("foo.x", "123");
        properties.put("foo.y", "abc");
        properties.put("foo.z", "bar");
        InterpolationProperties props = new InterpolationProperties(properties);
        String result = props.interpolate(
                "123ajh${foo.z} akl ${foo.y}${foo.y} laskj ${foo.x}\n"
                        + "foo.x${foo.x}${foo.x} ${foo.z}${foo.y}");
        assertEquals("123ajhbar akl abcabc laskj 123\nfoo.x123123 barabc", result);
    }
View Full Code Here


    @Test
    public void testInterpolateNonexistent() {
        boolean interpolatedNonexistentProperty = false;
        try {
            InterpolationProperties props = new InterpolationProperties(new Properties());
            props.interpolate("123 ${does.not.exist} 456");
            interpolatedNonexistentProperty = true;
        } catch (Exception e) {
            // success
        }
        assertFalse(interpolatedNonexistentProperty);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.