1 52 53 package freemarker.testcase; 54 55 import freemarker.template.TemplateBooleanModel; 56 import freemarker.template.TemplateScalarModel; 57 58 62 public class TestStringBiMethods extends AbstractTestCase { 63 64 public TestStringBiMethods( String aTestname ) { 65 super( aTestname ); 66 } 67 68 71 public void setUp() { 72 setUpFiles( "test-stringbimethods.txt" ); 73 root.put("multi", new TestBoolean()); 74 } 75 76 78 public static void main( String [] argc ) throws Exception { 79 AbstractTestCase cTest = new TestStringBiMethods( "test-stringbimethods.txt" ); 80 cTest.run(); 81 } 82 83 static class TestBoolean implements TemplateBooleanModel, TemplateScalarModel { 84 public boolean getAsBoolean() { 85 return true; 86 } 87 88 public String getAsString() { 89 return "de"; 90 } 91 } 92 93 } 94 | Popular Tags |