From: Tim P <ti...@us...> - 2010-02-19 01:04:21
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11890/test/unit/org/webmacro/template Modified Files: TestSetpropsDirective.java Log Message: Test should be failing Index: TestSetpropsDirective.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestSetpropsDirective.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestSetpropsDirective.java 19 Feb 2010 00:49:39 -0000 1.7 --- TestSetpropsDirective.java 19 Feb 2010 01:04:13 -0000 1.8 *************** *** 38,41 **** --- 38,50 ---- } + public void testSetpropsThrowsOnUnAllowedClass() throws Exception + { + String tmpl = "#setprops $e class=\"org.webmacro.WM\""; + tmpl += "\n{\n"; + tmpl += "}\n"; + tmpl += "$e"; + assertStringTemplateThrows(tmpl, WebMacroException.class); + } + /** * Test the basic functionality of the directive: create a new hashtable and *************** *** 77,81 **** public void testSetpropsAllowedPackage() throws Exception { ! System.getProperties().setProperty("org.webmacro.AllowedPackages", "java.lang,java.util,org.webmacro"); // overwrite the wm created in setup Broker.BROKERS.clear(); --- 86,90 ---- public void testSetpropsAllowedPackage() throws Exception { ! System.getProperties().setProperty("org.webmacro.AllowedPackages","java.lang,java.util,org.webmacro"); // overwrite the wm created in setup Broker.BROKERS.clear(); *************** *** 153,165 **** } - public void testSetpropsThrowsOnUnAllowedClass() throws Exception - { - String tmpl = "#setprops $e class=\"org.webmacro.WM\""; - tmpl += "\n{\n"; - tmpl += "}\n"; - tmpl += "$e"; - assertStringTemplateThrows(tmpl, WebMacroException.class); - } - public class User { --- 162,165 ---- |