NIHVIVO-2470 Initial work on new dump template. Handle undefined variables.

This commit is contained in:
ryounes 2011-04-20 21:23:38 +00:00
parent 4bff64ca12
commit 84f779238c
9 changed files with 96 additions and 56 deletions

View file

@ -71,6 +71,22 @@ public class DumpDirectiveTest {
Logger.getLogger(BaseDumpDirective.class).setLevel(Level.OFF);
}
@Test
public void dumpUndefinedValue() {
String varName = "dog";
Map<String, Object> dataModel = new HashMap<String, Object>();
Map<String, Object> expectedDumpValue = new HashMap<String, Object>();
expectedDumpValue.put(Key.TYPE.toString(), Type.UNDEFINED);
expectedDumpValue.put(Key.VALUE.toString(), BaseDumpDirective.VALUE_UNDEFINED);
Map<String, Object> expectedDump = new HashMap<String, Object>();
expectedDump.put(varName, expectedDumpValue);
test(varName, dataModel, expectedDump);
}
@Test
public void dumpString() {