From: <lan...@us...> - 2002-12-21 01:07:00
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sc8-pr-cvs1:/tmp/cvs-serv12896/test/unit/org/webmacro/template Modified Files: TestParseInclude.java Added Files: frame.wm href.wm Log Message: macro additions --- NEW FILE: frame.wm --- #comment { frame.wm A template to excercise frame formatting. } #include as macro "allmacros.wmm" ## set up some useful data for the transaction. ## see the paypalSetup macro for the property name specs. #bean $System = "java.lang.System" scope=static #bean $contentProps = "org.webmacro.util.SparseProperties" scope=page onNew { #set $contentProps.title = "A Pop Up Window" #set $contentProps.top = "http://www.webmacro.org/EricRidge" #set $contentProps.bottom = "close.html" } ## set all the tran properties #bean $frameProps = "org.webmacro.util.SparseProperties" scope=page onNew { #set $frameProps.bottomSize = "50" #set $frameProps.borderEnabled = "yes" #set $frameProps.borderSize = "1" #set $frameProps.spacing = "1" } ## now create the content. #closeableWindow($contentProps, $frameProps) --- NEW FILE: href.wm --- #comment { href.wm A template to excercise href formatting. } #include as macro "allmacros.wmm" ## set up some useful test data for the url properties and the javascript properties #bean $System = "java.lang.System" scope=static #bean $urlProps = "org.webmacro.util.SparseProperties" scope=page onNew { #set $urlProps.url = "winFrame.html" #set $urlProps.visibleContent = "Click Me To See A Pop-Up Window" } ## set all the javascript props #bean $scriptProps = "org.webmacro.util.SparseProperties" scope=page onNew { #set $scriptProps.resizeable = "yes" #set $scriptProps.width = "500" #set $scriptProps.height = "700" } ## now create the content. <html> <center> Content generation: <p> #hrefInWindow($urlProps, $scriptProps) </p></center> </html> Index: TestParseInclude.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestParseInclude.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestParseInclude.java 25 Nov 2002 23:55:25 -0000 1.7 --- TestParseInclude.java 21 Dec 2002 01:06:55 -0000 1.8 *************** *** 104,107 **** --- 104,122 ---- } + + /** executes out of the standard macro/ distribution: html. */ + public void testHrefMacro() throws Exception { + // execute the pay pal eCommerce test case and store the output + String value = executeFileTemplate("org/webmacro/template/href.wm"); + store(System.getProperty("user.dir") + "/" + "windows.html", value); + } + + /** executes out of the standard macro/ distribution: html. */ + public void testFrameMacro() throws Exception { + // execute the pay pal eCommerce test case and store the output + String value = executeFileTemplate("org/webmacro/template/frame.wm"); + store(System.getProperty("user.dir") + "/" + "winFrame.html", value); + } + |