1 52 53 package freemarker.testcase; 54 55 import freemarker.template.SimpleHash; 56 57 61 public class TestHashLiteral extends AbstractTestCase { 62 63 public TestHashLiteral( String aTestname ) { 64 super( aTestname ); 65 } 66 67 70 public void setUp() { 71 setUpFiles( "test-hashliteral.html" ); 72 73 root.put("message", "Hello, world!"); 74 root.put("test", "test-me"); 75 root.put("foo", "bar"); 76 root.put("one", "1"); 77 78 SimpleHash cModel1 = new SimpleHash(); 79 80 cModel1.put( "temp", "Temporary" ); 81 root.put( "hash", cModel1 ); 82 } 83 84 86 public static void main( String [] argc ) throws Exception { 87 AbstractTestCase cTest = new TestHashLiteral( "test-hashliteral.html" ); 88 cTest.run(); 89 } 90 } 91 | Popular Tags |