From d126241bcd4b9ed38e6aef8c45f0c5b9413ba954 Mon Sep 17 00:00:00 2001 From: ryounes Date: Tue, 19 Apr 2011 13:30:23 +0000 Subject: [PATCH] NIHVIVO-1564 Commit changes that should have been included in r7823. --- .../ext/dump/DumpAllDirectiveTest.java | 48 +++++++++++++++++++ .../ext/dump/DumpDirectiveTest.java | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 webapp/test/freemarker/ext/dump/DumpAllDirectiveTest.java diff --git a/webapp/test/freemarker/ext/dump/DumpAllDirectiveTest.java b/webapp/test/freemarker/ext/dump/DumpAllDirectiveTest.java new file mode 100644 index 000000000..62554d916 --- /dev/null +++ b/webapp/test/freemarker/ext/dump/DumpAllDirectiveTest.java @@ -0,0 +1,48 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package freemarker.ext.dump; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.fail; + +import java.io.StringReader; +import java.io.StringWriter; +import java.util.Map; + +import org.apache.log4j.Level; +import org.apache.log4j.Logger; +import org.junit.Before; +import org.junit.Test; + +import freemarker.core.Environment; +import freemarker.template.Configuration; +import freemarker.template.Template; + +public class DumpAllDirectiveTest { + + private Template template; + + @Before + public void setUp() { + Configuration config = new Configuration(); + String templateStr = ""; + try { + template = new Template("template", new StringReader(templateStr), config); + } catch (Exception e) { + fail(e.getMessage()); + } + // Turn off log messages to console + Logger.getLogger(BaseDumpDirective.class).setLevel(Level.OFF); + } + + @Test + public void dumpDataModel() { + + } + + + /////////////////////////// Private stub classes and helper methods /////////////////////////// + + + +} diff --git a/webapp/test/freemarker/ext/dump/DumpDirectiveTest.java b/webapp/test/freemarker/ext/dump/DumpDirectiveTest.java index 3a4dbc209..ab1febc1a 100644 --- a/webapp/test/freemarker/ext/dump/DumpDirectiveTest.java +++ b/webapp/test/freemarker/ext/dump/DumpDirectiveTest.java @@ -707,7 +707,7 @@ public class DumpDirectiveTest { private Map getDump(String varName, Map dataModel) { try { Environment env = template.createProcessingEnvironment(dataModel, new StringWriter()); - return new DumpDirective().getTemplateVariableData(varName, env); + return new DumpDirective().getTemplateVariableDump(varName, env); } catch (Exception e) { fail(e.getMessage()); return null;