From: Tim P <ti...@us...> - 2010-02-18 23:29:58
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv2209/test/unit/org/webmacro/template Modified Files: TestSetpropsDirective.java Log Message: Test both not found and not allowed Index: TestSetpropsDirective.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestSetpropsDirective.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestSetpropsDirective.java 18 Feb 2010 23:08:56 -0000 1.4 --- TestSetpropsDirective.java 18 Feb 2010 23:29:48 -0000 1.5 *************** *** 114,122 **** } ! /** ! * Tests the "class" option with the ImpliedPackages configuration ! * option which lets you omit the package from the class name. ! */ ! public void testSetpropsThrows() throws Exception { String tmpl = "#setprops $e class=\"org.melati.Melati\""; --- 114,118 ---- } ! public void testSetpropsThrowsOnNotFoundClass() throws Exception { String tmpl = "#setprops $e class=\"org.melati.Melati\""; *************** *** 127,130 **** --- 123,135 ---- } + public void testSetpropsThrowsOnUnAllowedClass() throws Exception + { + String tmpl = "#setprops $e class=\"org.webmacro.WM\""; + tmpl += "\n{\n"; + tmpl += "}\n"; + tmpl += "$e"; + assertStringTemplateThrows(tmpl, WebMacroException.class); + } + /** * Tests the "class" option with the AllowedPackages configuration |