@Test public void testBuild() { ExtraParameters extraParameters = new ExtraParameters(); extraParameters.put("myString", "${buildId} is in project ${projectId}"); VariableResolver resolver = new WebHooksBeanUtilsVariableResolver( null, new WebHookPayloadContent.SimpleSerialiser(), new JavaBean("bt01", "project01"), extraParameters, null ); WebHookVariableMessageBuilder builder = WebHookVariableMessageBuilder.create(resolver); assertEquals("bt01", builder.build("${buildId}")); assertEquals("project01", builder.build("${projectId}")); assertEquals("bt01 is in project project01", builder.build("${myString}")); }
@Override public String build(String template) { return matcher.replace(matcher.replace(template, resolver),resolver); }
WebHookVariableMessageBuilder implements VariableMessageBuilder { @Override public String build(String template) { return matcher.replace(matcher.replace(template, resolver),resolver); } }
WebHookVariableMessageBuilder implements VariableMessageBuilder { @Override public String build(String template) { return matcher.replace(matcher.replace(template, resolver),resolver); }  }
WebHookVariableMessageBuilder implements VariableMessageBuilder { @Override public String build(String template) { return matcher.replace(matcher.replace(template, resolver),resolver); }  static WebHookVariableMessageBuilder create(VariableResolver resolver); @Override String build(String template); }
WebHookVariableMessageBuilder implements VariableMessageBuilder { @Override public String build(String template) { return matcher.replace(matcher.replace(template, resolver),resolver); }  static WebHookVariableMessageBuilder create(VariableResolver resolver); @Override String build(String template);  }