1 52 53 package freemarker.testcase; 54 55 import freemarker.template.SimpleScalar; 56 import freemarker.template.SimpleSequence; 57 58 64 public class TestExtendedList extends AbstractTestCase { 65 66 public TestExtendedList(String aTestname) { 67 super( aTestname ); 68 } 69 70 73 public void setUp() { 74 setUpFiles( "test-extlist.html" ); 75 root.put("message", new SimpleScalar("Hello, world!")); 76 77 SimpleSequence list = new SimpleSequence(); 78 list.add( "aardvark" ); 79 list.add( "kiwi" ); 80 list.add( "gecko" ); 81 list.add( "cat" ); 82 list.add( "dog" ); 83 list.add( "elephant" ); 84 list.add( "squirrel" ); 85 list.add( "zebra" ); 86 87 root.put( "animals", list ); 88 } 89 90 92 public static void main( String [] argc ) throws Exception { 93 AbstractTestCase cTest = new TestExtendedList( "test-extlist.html" ); 94 cTest.run(); 95 } 96 } 97 | Popular Tags |