From: Tim P <ti...@us...> - 2008-11-12 23:41:38
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21814/test/unit/org/webmacro/template Modified Files: TemplateTestCase.java TestSetpropsDirective.java Log Message: Cannot rely upon name constructor being called, use our init method, thats what it is for. Index: TestSetpropsDirective.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestSetpropsDirective.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestSetpropsDirective.java 17 Oct 2005 04:30:26 -0000 1.1 --- TestSetpropsDirective.java 12 Nov 2008 23:41:31 -0000 1.2 *************** *** 8,24 **** { ! public TestSetpropsDirective(String name) { ! super(name); ! System.getProperties().setProperty("org.webmacro.ImpliedPackages", ! "java.util"); ! System.getProperties().setProperty("org.webmacro.AllowedPackages", ! "java.util"); } ! public void stuffContext(Context context) throws Exception { ! context ! .setEvaluationExceptionHandler(new CrankyEvaluationExceptionHandler()); context.put("User", new User()); } --- 8,36 ---- { ! public TestSetpropsDirective() ! { ! super(); ! } ! public TestSetpropsDirective(String name) ! { ! super(name); ! } ! ! protected void setUp () throws Exception { ! super.setUp(); } ! public void init () throws Exception ! { ! System.getProperties().setProperty("org.webmacro.ImpliedPackages", ! "java.util"); ! System.getProperties().setProperty("org.webmacro.AllowedPackages", ! "java.util"); ! super.init(); ! } ! public void stuffContext(Context context) throws Exception { ! context.setEvaluationExceptionHandler(new CrankyEvaluationExceptionHandler()); context.put("User", new User()); } Index: TemplateTestCase.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TemplateTestCase.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** TemplateTestCase.java 4 Nov 2008 20:59:05 -0000 1.23 --- TemplateTestCase.java 12 Nov 2008 23:41:31 -0000 1.24 *************** *** 19,22 **** --- 19,26 ---- + public TemplateTestCase () + { + super(); + } public TemplateTestCase (String name) { |