public void setMessageBundle(TemplateMethodModel resourceBundleModel) { this.messageBundleModel = resourceBundleModel; }
public void setSourceLinker(TemplateMethodModel sourceLinker) { this.sourceLinker = sourceLinker; }
public TemplateMethodModel getMessage() { return messageBundleModel; }
public TemplateMethodModel getSourceLink() { return sourceLinker; }
private Object executeUriMethod(String contextPath, String relativePath) throws TemplateModelException { TemplateMethodModel uriMethod = new UriMethod(contextPath); return uriMethod.exec(asList(relativePath)); }
@Test(expected = TemplateModelException.class) public void test_throw_exception_when_no_arguments_are_provided() throws Throwable { TemplateMethodModel uriMethod = new UriMethod("/context"); uriMethod.exec(emptyList()); }
@Test(expected = TemplateModelException.class) public void test_only_one_argument_is_expected() throws Throwable { TemplateMethodModel uriMethod = new UriMethod("/context"); uriMethod.exec(asList("/foo", "/bar")); }