mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-22 14:36:53 +01:00
fix mustache render failure test
This commit is contained in:
@@ -58,6 +58,8 @@ public abstract class TemplateTestBase
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public abstract Template getFailureTemplate() throws IOException;
|
||||
|
||||
@@ -101,6 +103,14 @@ public abstract class TemplateTestBase
|
||||
execute(template);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param env
|
||||
*/
|
||||
protected void prepareEnv(Map<String, Object> env) {}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -113,10 +123,12 @@ public abstract class TemplateTestBase
|
||||
*/
|
||||
private String execute(Template template) throws IOException
|
||||
{
|
||||
Map<String, String> env = Maps.newHashMap();
|
||||
Map<String, Object> env = Maps.newHashMap();
|
||||
|
||||
env.put("name", "marvin");
|
||||
|
||||
prepareEnv(env);
|
||||
|
||||
StringWriter writer = new StringWriter();
|
||||
|
||||
template.execute(writer, env);
|
||||
|
||||
Reference in New Issue
Block a user