1 52 53 package freemarker.testcase; 54 55 import junit.framework.TestResult; 56 import freemarker.template.SimpleNumber; 57 import freemarker.template.SimpleScalar; 58 import freemarker.testcase.models.MultiModel1; 59 60 65 public class TestMultiModels extends AbstractTestCase { 66 67 public TestMultiModels( String aTestname ) { 68 super( aTestname ); 69 } 70 71 74 public void setUp() { 75 setUpFiles( "test-models.html" ); 76 77 root.put("message", new SimpleScalar("Hello, world!")); 78 root.put("test", new SimpleScalar("selftest")); 79 root.put("self", new SimpleScalar("self")); 80 root.put("zero", new SimpleNumber(new Integer (0))); 81 root.put("data", new MultiModel1()); 82 83 } 84 85 87 public static void main( String [] argc ) throws Exception { 88 AbstractTestCase cTest = new TestMultiModels( "test-models.html" ); 89 TestResult cResults = new TestResult(); 90 91 cTest.run( cResults ); 92 } 93 } 94 | Popular Tags |