@Test public void getNewValue() { ReplaceResourcePropertyValues action = new ReplaceResourcePropertyValuesRegex(OLD_VAL, NEW_VAL, Arrays.asList()); assertEquals("newVal", action.getNewValue("oldVal")); assertEquals("1newVal", action.getNewValue("1oldVal")); assertEquals("newVal1", action.getNewValue("oldVal1")); assertEquals("1newVal1", action.getNewValue("1oldVal1")); assertEquals("1newVal11newVal1", action.getNewValue("1oldVal11oldVal1")); }
@Override protected String getNewValue(String propertyValue) { return propertyValue.replaceAll(searchRegex, replacement); }
ReplaceResourcePropertyValuesRegex extends ReplaceResourcePropertyValues { @Override protected String getNewValue(String propertyValue) { return propertyValue.replaceAll(searchRegex, replacement); } }
ReplaceResourcePropertyValuesRegex extends ReplaceResourcePropertyValues { @Override protected String getNewValue(String propertyValue) { return propertyValue.replaceAll(searchRegex, replacement); } ReplaceResourcePropertyValuesRegex(String searchRegex, String replacement, List<String> propertyNames); }
ReplaceResourcePropertyValuesRegex extends ReplaceResourcePropertyValues { @Override protected String getNewValue(String propertyValue) { return propertyValue.replaceAll(searchRegex, replacement); } ReplaceResourcePropertyValuesRegex(String searchRegex, String replacement, List<String> propertyNames);  }
ReplaceResourcePropertyValuesRegex extends ReplaceResourcePropertyValues { @Override protected String getNewValue(String propertyValue) { return propertyValue.replaceAll(searchRegex, replacement); } ReplaceResourcePropertyValuesRegex(String searchRegex, String replacement, List<String> propertyNames);   }