NIHVIVO-1564 Commit changes that should have been included in r7823.

This commit is contained in:
ryounes 2011-04-19 13:30:23 +00:00
parent f7dbdc4889
commit d126241bcd
2 changed files with 49 additions and 1 deletions

View file

@ -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 ///////////////////////////
}

View file

@ -707,7 +707,7 @@ public class DumpDirectiveTest {
private Map<String, Object> getDump(String varName, Map<String, Object> 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;