@Test public void testRenderTemplateFileSubstitutesPropertiesWithDotsFromContext() throws IOException { TemplateRenderer trWithCustomProperties = mkTemplateRendererWithPropertiesMap(new HashMap<>()); File file = writeTemplateFromString(wrapTemplateXml(addPropertiesToTemplate(exampleDotTemplate, new HashMap<>()))); HashMap<String, Object> contextMap = new HashMap<>(); contextMap.put("property", new Property()); String result = trWithCustomProperties.renderTemplateFile(file, contextMap); assertThat(result).doesNotContain("$" + propertyWithDotKey); assertThat(result).doesNotContain("${" + propertyWithDotKey + "}"); assertThat(result).doesNotContain("$" + propertyWithDotKey); assertThat(result).contains("<test" + propertyWithDotValue + ">" + propertyWithDotValue + "</test" + propertyWithDotValue + ">"); }
public String renderTemplateFile(File templateFile, Map<String, Object> contextMap) { for (Map.Entry<String, Object> entry : contextMap.entrySet()) { renderContext.put(entry.getKey(), entry.getValue()); } return renderTemplateFile(templateFile); }
TemplateRenderer { public String renderTemplateFile(File templateFile, Map<String, Object> contextMap) { for (Map.Entry<String, Object> entry : contextMap.entrySet()) { renderContext.put(entry.getKey(), entry.getValue()); } return renderTemplateFile(templateFile); } }
TemplateRenderer { public String renderTemplateFile(File templateFile, Map<String, Object> contextMap) { for (Map.Entry<String, Object> entry : contextMap.entrySet()) { renderContext.put(entry.getKey(), entry.getValue()); } return renderTemplateFile(templateFile); } TemplateRenderer();  TemplateRenderer(Map<String, Object> initMap); }
TemplateRenderer { public String renderTemplateFile(File templateFile, Map<String, Object> contextMap) { for (Map.Entry<String, Object> entry : contextMap.entrySet()) { renderContext.put(entry.getKey(), entry.getValue()); } return renderTemplateFile(templateFile); } TemplateRenderer();  TemplateRenderer(Map<String, Object> initMap); String renderTemplateFile(File templateFile, Map<String, Object> contextMap); String renderTemplateFile(File templateFile); Optional<String> renderClassPathWorkflow(); }
TemplateRenderer { public String renderTemplateFile(File templateFile, Map<String, Object> contextMap) { for (Map.Entry<String, Object> entry : contextMap.entrySet()) { renderContext.put(entry.getKey(), entry.getValue()); } return renderTemplateFile(templateFile); } TemplateRenderer();  TemplateRenderer(Map<String, Object> initMap); String renderTemplateFile(File templateFile, Map<String, Object> contextMap); String renderTemplateFile(File templateFile); Optional<String> renderClassPathWorkflow(); static final String CLASSPATH_WORKFLOW_XML; }