From: <lan...@us...> - 2003-07-21 05:49:50
|
Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template In directory sc8-pr-cvs1:/tmp/cvs-serv11197/test/unit/org/webmacro/template Modified Files: TestParseInclude.java ecomm.wm Added Files: verisign.wm Log Message: Add macros missing required for execution and unit tests. --- NEW FILE: verisign.wm --- #comment { ecomm.wm A template to excercise the standard eCommerce macros supplied with WM. } #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 ## verisign data... #bean $App = "org.webmacro.util.SparseProperties" scope=page onNew { #set $App.LoginName = "opendoors" #set $App.PartnerName = "VeriSign" #set $App.InputType = "image" #set $App.SubmitLabel = "Complete Order" #set $App.imageURL = "http://lyon.opendoors.com/img/completeOrder.gif" } #bean $Tran = "org.webmacro.util.SparseProperties" scope=page onNew { #set $Tran.Amount = "100.00" #set $Tran.TranType = "S" } ## now invoke the paypal macro with some supporting html so it can be viewed <html> <center> <p> Please go to the account of $App.LoginName. Amount Due=$Tran.Amount USD </p> <p> calling: #ccBasicTransaction( $Tran, $App ) </center> </html> Index: TestParseInclude.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/TestParseInclude.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestParseInclude.java 14 Jul 2003 09:39:15 -0000 1.12 --- TestParseInclude.java 21 Jul 2003 05:49:47 -0000 1.13 *************** *** 98,101 **** --- 98,104 ---- + "$a", "\\$a was found"); + assertStringTemplateMatches("#include as macro \"root.wmm\"\n" + + "$a", "\\$a was found"); + } *************** *** 147,151 **** store(System.getProperty("user.dir") + "/" + "ecomm.html", value); } - /** executes out of the standard macro/ distribution. */ --- 150,153 ---- Index: ecomm.wm =================================================================== RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/template/ecomm.wm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ecomm.wm 23 Mar 2003 02:00:41 -0000 1.2 --- ecomm.wm 21 Jul 2003 05:49:47 -0000 1.3 *************** *** 1,63 **** ! #comment { ! ecomm.wm ! A template to excercise the standard eCommerce macros supplied with WM. ! } ! #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 ! ! ## verisign data... ! #bean $App = "org.webmacro.util.SparseProperties" scope=page onNew { ! #set $App.LoginName = "lanesharman" ! #set $App.PartnerName = "VeriSign" ! } ! #bean $Tran = "org.webmacro.util.SparseProperties" scope=page onNew { ! #set $Tran.Amount = "100.00" ! #set $Tran.TranType = "S" ! } ! ! #bean $cust = "org.webmacro.util.SparseProperties" scope=page onNew { ! #set $cust.firstName = $System.getProperty("user.name") ! } ! ## set all the tran properties ! #bean $tran = "org.webmacro.util.SparseProperties" scope=page onNew { ! #set $tran.sellersEmailAccount = "su...@op..." ! #set $tran.itemName = "WebMacro Dues" ! #set $tran.itemNumber = "9092" ! #set $tran.amount = "25.00" ! #set $tran.specialInstructions = "Your Dues Help Support WebMacro Publicity!" ! } ! #bean $app = "org.webmacro.util.SparseProperties" scope=page onNew { ! #set $app.returnURL = "http://www.webmacro.org" ! #set $app.cancelURL = "http://www.webmacro.org/CancelDues" ! } ! ! ## now invoke the paypal macro with some supporting html so it can be viewed ! <html> ! <center> ! $cust.firstName: ! <p> ! Please Pay Your WebMacro Dues Today at PayPal. ! <br> ! $tran.amount is due and will keep your WebMacro subscritpion rolling. ! <p> ! #paypalSetup($cust, $tran, $app) ! <hr> ! #bean $bongoTran = "org.webmacro.util.SparseProperties" scope=page onNew { ! #set $bongoTran.sellersEmailAccount = "sa...@op..." ! #set $bongoTran.itemName = "Bongo Annual Subscription" ! #set $bongoTran.itemNumber = "9102" ! #set $bongoTran.amount = "72.00" ! #set $bongoTran.specialInstructions = "Your Dues Help Support WebMacro Publicity!" ! } ! #set $app.returnURL = "http://opendoors.com/bongo/paid" ! #set $app.cancelURL = "http://opendoors.com/bongo/cancel" ! <p> ! Also, please consider a one year subscription to bongo. ! <br> ! The most amazing graphical interface builder for java! Just $bongoTran.amount USD. ! #paypalSubscribe($cust, $bongoTran, $app); ! </center> ! </html> --- 1 ---- ! #comment { ecomm.wm A template to excercise the standard eCommerce macros supplied with WM. } #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 ## verisign data... #bean $App = "org.webmacro.util.SparseProperties" scope=page onNew { #set $App.LoginName = "lanesharman" #set $App.PartnerName = "VeriSign" } #bean $Tran = "org.webmacro.util.SparseProperties" scope=page onNew { #set $Tran.Amount = "100.00" #set $Tran.TranType = "S" } #bean $cust = "org.webmacro.util.SparseProperties" scope=page onNew { #set $cust.firstName = $System.getProperty("user.name") } ## set all the tran properties #bean $tran = "org.webmacro.util.SparseProperties" scope=page onNew { #set $tran.sellersEmailAccount = "su...@op..." #set $tran.itemName = "WebMacro Dues" #set $tran.itemNumber = "9092" #set $tran.amount = "25.00" #set $tran.specialInstructions = "Your Dues Help Support WebMacro Publicity!" } #bean $app = "org.webmacro.util.SparseProperties" scope=page onNew { #set $app.returnURL = "http://www.webmacro.org" #set $app.cancelURL = "http://www.webmacro.org/CancelDues" } ## now invoke the paypal macro with some supporting html so it can be viewed <html> <center> $cust.firstName: <p> Please Pay Your WebMacro Dues Today at PayPal. <br> $tran.amount is due and will keep your WebMacro subscritpion rolling. <p> #paypalSetup($cust, $tran, $app) <hr> #bean $bongoTran = "org.webmacro.util.SparseProperties" scope=page onNew { #set $bongoTran.sellersEmailAccount = "sa...@op..." #set $bongoTran.itemName = "Bongo Annual Subscription" #set $bongoTran.itemNumber = "9102" #set $bongoTran.amount = "72.00" #set $bongoTran.specialInstructions = "Your Dues Help Support WebMacro Publicity!" } #set $app.returnURL = "http://opendoors.com/bongo/paid" #set $app.cancelURL = "http://opendoors.com/bongo/cancel" <p> Also, please consider a one year subscription to bongo. <br> The most amazing graphical interface builder for java! Just $bongoTran.amount USD. #paypalSubscribe($cust, $bongoTran, $app); </center> </html> \ No newline at end of file |