@Test public void testParseTemplate_NULLParam() { System.out.println("parseTemplate"); String tpl = "Testing the <method> method of the <class> class"; String result = instance.parseTemplate(tpl, null); assertEquals(tpl, result); }
public String parseTemplate(String template, Set<NameValuePair> templateParams) { String tag, value; if (templateParams == null) { return template; } for (NameValuePair detail : templateParams) { tag = "<" + detail.getName() + ">"; value = detail.getValue(); if (value != null && !value.isEmpty()) template = template.replaceAll(tag, value); } return template.trim(); }
MessageStoreManagerImpl implements MessageStoreManager, ApplicationContextAware { public String parseTemplate(String template, Set<NameValuePair> templateParams) { String tag, value; if (templateParams == null) { return template; } for (NameValuePair detail : templateParams) { tag = "<" + detail.getName() + ">"; value = detail.getValue(); if (value != null && !value.isEmpty()) template = template.replaceAll(tag, value); } return template.trim(); } }
MessageStoreManagerImpl implements MessageStoreManager, ApplicationContextAware { public String parseTemplate(String template, Set<NameValuePair> templateParams) { String tag, value; if (templateParams == null) { return template; } for (NameValuePair detail : templateParams) { tag = "<" + detail.getName() + ">"; value = detail.getValue(); if (value != null && !value.isEmpty()) template = template.replaceAll(tag, value); } return template.trim(); }  }
MessageStoreManagerImpl implements MessageStoreManager, ApplicationContextAware { public String parseTemplate(String template, Set<NameValuePair> templateParams) { String tag, value; if (templateParams == null) { return template; } for (NameValuePair detail : templateParams) { tag = "<" + detail.getName() + ">"; value = detail.getValue(); if (value != null && !value.isEmpty()) template = template.replaceAll(tag, value); } return template.trim(); }  GatewayRequest constructMessage(MessageRequest messageRequest, Language defaultLang); String parseTemplate(String template, Set<NameValuePair> templateParams); String formatPhoneNumber(String requesterPhone, MessageType type); CoreManager getCoreManager(); void setCoreManager(CoreManager coreManager); void setMaxConcat(int maxConcat); void setCharsPerSMS(int charsPerSMS); void setConcatAllowance(int concatAllowance); void setLocalNumberExpression(String localNumberExpression); void setDefaultCountryCode(String defaultCountryCode); void setApplicationContext(ApplicationContext applicationContext); }
MessageStoreManagerImpl implements MessageStoreManager, ApplicationContextAware { public String parseTemplate(String template, Set<NameValuePair> templateParams) { String tag, value; if (templateParams == null) { return template; } for (NameValuePair detail : templateParams) { tag = "<" + detail.getName() + ">"; value = detail.getValue(); if (value != null && !value.isEmpty()) template = template.replaceAll(tag, value); } return template.trim(); }  GatewayRequest constructMessage(MessageRequest messageRequest, Language defaultLang); String parseTemplate(String template, Set<NameValuePair> templateParams); String formatPhoneNumber(String requesterPhone, MessageType type); CoreManager getCoreManager(); void setCoreManager(CoreManager coreManager); void setMaxConcat(int maxConcat); void setCharsPerSMS(int charsPerSMS); void setConcatAllowance(int concatAllowance); void setLocalNumberExpression(String localNumberExpression); void setDefaultCountryCode(String defaultCountryCode); void setApplicationContext(ApplicationContext applicationContext);  }