Code example for Properties

Methods: getProperty, setProperty

0
        assertEquals(PropertiesHelper.doSingleSubstitution("presenting: ${blinfiddle.ox.heart} -- ${ornithopter.defenestration}.", null), "presenting: orange juice -- nickel."); 
    } 
 
    @Test 
    public void shouldDoVariableSubstitutionOnProperties() throws Exception { 
        Properties properties = new Properties();
        properties.setProperty("result", "{${first.value} + ${system.value.xbf5547}}");
        System.setProperty("system.value.xbf5547", "system");
        properties.setProperty("first.value", "first");
        PropertiesHelper.doSubstitutions(properties);
        assertEquals("{first + system}", properties.getProperty("result"));
    } 
}