use of freemarker.template.TemplateHashModel in project jbehave-core by jbehave.
the class TemplateableOutput method afterStory.
@Override
public void afterStory(boolean givenStory) {
if (!givenStory) {
Map<String, Object> model = newDataModel();
model.put("story", outputStory);
model.put("keywords", new OutputKeywords(keywords));
TemplateHashModel enumModels = BeansWrapper.getDefaultInstance().getEnumModels();
TemplateHashModel escapeEnums;
try {
String escapeModeEnum = EscapeMode.class.getCanonicalName();
escapeEnums = (TemplateHashModel) enumModels.get(escapeModeEnum);
model.put("EscapeMode", escapeEnums);
} catch (TemplateModelException e) {
throw new IllegalArgumentException(e);
}
write(file, templatePath, model);
}
}
Aggregations