use of com.navercorp.pinpoint.bootstrap.util.spring.PropertyPlaceholderHelper in project pinpoint by naver.
the class PropertyPlaceholderHelperTest method testReplacePlaceholders.
@Test
public void testReplacePlaceholders() {
Properties properties = new Properties();
properties.setProperty("test", "a");
PropertyPlaceholderHelper helper = new PropertyPlaceholderHelper("${", "}");
String value1 = helper.replacePlaceholders("${test}", properties);
Assert.assertEquals("a", value1);
String value2 = helper.replacePlaceholders("123${test}456", properties);
Assert.assertEquals("123a456", value2);
String value3 = helper.replacePlaceholders("123${test}456${test}", properties);
Assert.assertEquals("123a456a", value3);
}
Aggregations