@Test public void buildPlainTextMailTest() { Map<String, Object> values = Maps.newHashMap(); values.put("key", "value"); assertThat(mailContentService.buildPlainTextMail("template", values), is(notNullValue())); }
public String buildPlainTextMail(String mailBody, final Map<String, Object> details) { for (Map.Entry<String, Object> entry : details.entrySet()) { mailBody = mailBody.replace("${".concat(entry.getKey()).concat("}"), entry.getValue().toString()); } return mailBody; }
MailContentBuilderService { public String buildPlainTextMail(String mailBody, final Map<String, Object> details) { for (Map.Entry<String, Object> entry : details.entrySet()) { mailBody = mailBody.replace("${".concat(entry.getKey()).concat("}"), entry.getValue().toString()); } return mailBody; } }
MailContentBuilderService { public String buildPlainTextMail(String mailBody, final Map<String, Object> details) { for (Map.Entry<String, Object> entry : details.entrySet()) { mailBody = mailBody.replace("${".concat(entry.getKey()).concat("}"), entry.getValue().toString()); } return mailBody; } @Autowired  MailContentBuilderService(TemplateEngine templateEngine); }
MailContentBuilderService { public String buildPlainTextMail(String mailBody, final Map<String, Object> details) { for (Map.Entry<String, Object> entry : details.entrySet()) { mailBody = mailBody.replace("${".concat(entry.getKey()).concat("}"), entry.getValue().toString()); } return mailBody; } @Autowired  MailContentBuilderService(TemplateEngine templateEngine); String build(final String templateNameOrUrl, final Map<String, String> details); String buildPlainTextMail(String mailBody, final Map<String, Object> details); String getRemoteMailContent(String templateUrl); }
MailContentBuilderService { public String buildPlainTextMail(String mailBody, final Map<String, Object> details) { for (Map.Entry<String, Object> entry : details.entrySet()) { mailBody = mailBody.replace("${".concat(entry.getKey()).concat("}"), entry.getValue().toString()); } return mailBody; } @Autowired  MailContentBuilderService(TemplateEngine templateEngine); String build(final String templateNameOrUrl, final Map<String, String> details); String buildPlainTextMail(String mailBody, final Map<String, Object> details); String getRemoteMailContent(String templateUrl);  }