svn commit: r793341 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/test/AutoPaymentTests.xml testdef/paymenttests.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r793341 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/test/AutoPaymentTests.xml testdef/paymenttests.xml

ashish-18
Author: ashish
Date: Sun Jul 12 12:09:56 2009
New Revision: 793341

URL: http://svn.apache.org/viewvc?rev=793341&view=rev
Log:
Applied patch from jira issue OFBIZ-2708 -  Junit tests for the AR Batch Payments
Implemented:
– Modified test case according to service createPaymentGroupAndMember.
Thanks Awdesh, Rishi for the contribution.

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml
    ofbiz/trunk/applications/accounting/testdef/paymenttests.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml?rev=793341&r1=793340&r2=793341&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml Sun Jul 12 12:09:56 2009
@@ -21,17 +21,19 @@
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
     
-    <simple-method method-name="testCreateBatchForPayments" short-description="auto test batching process" login-required="false">
+    <simple-method method-name="testCreatePaymentGroupAndMember" short-description="auto test createPaymentGroupAndMember service" login-required="false">
         <set field="paymentIds[]" value="demo10001"/>
         <set field="paymentIds[]" value="demo10010"/>
+        <set field="paymentGroupTypeId" value="BATCH_PAYMENT"/>
         <set field="paymentGroupName" value="Payment Batch"/>
         <entity-one entity-name="UserLogin" value-field="userLogin">
             <field-map field-name="userLoginId" value="system"/>
         </entity-one>
         <set field="serviceInMap.paymentIds" from-field="paymentIds"/>
+        <set field="serviceInMap.paymentGroupTypeId" from-field="paymentGroupTypeId"/>
         <set field="serviceInMap.paymentGroupName" from-field="paymentGroupName"/>
         <set field="serviceInMap.userLogin" from-field="userLogin"/>
-        <call-service service-name="createPaymentBatch" in-map-name="serviceInMap">
+        <call-service service-name="createPaymentGroupAndMember" in-map-name="serviceInMap">
             <result-to-field result-name="paymentGroupId"/>
         </call-service>
         <entity-one entity-name="PaymentGroup" value-field="paymentGroup"/>
@@ -41,6 +43,7 @@
         <assert>
             <not><if-empty field="paymentGroupMemberList"/></not>
             <if-compare-field field="paymentGroupName" operator="equals" to-field="paymentGroup.paymentGroupName"/>
+            <if-compare-field field="paymentGroupTypeId" operator="equals" to-field="paymentGroup.paymentGroupTypeId"/>
         </assert>
         <check-errors/>
         <iterate list="paymentGroupMemberList" entry="paymentGroupMember">
@@ -52,7 +55,7 @@
             </assert>
             <check-errors/>
         </iterate>
-        <log level="info" message="Batch ${paymentGroupId} is created successfully for payments"/>
+        <log level="info" message="Payment Group ${paymentGroupId} is created successfully for payments"/>
     </simple-method>
 
     <simple-method method-name="testVoidPayment" short-description="Test case for voiding payments" login-required="false">

Modified: ofbiz/trunk/applications/accounting/testdef/paymenttests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/testdef/paymenttests.xml?rev=793341&r1=793340&r2=793341&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/testdef/paymenttests.xml (original)
+++ ofbiz/trunk/applications/accounting/testdef/paymenttests.xml Sun Jul 12 12:09:56 2009
@@ -22,8 +22,8 @@
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
 
     <!-- Test case for Batching Payments process-->
-    <test-case case-name="auto-create-batch-for-payments">
-        <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml" name="testCreateBatchForPayments"/>
+    <test-case case-name="auto-create-payment-group-and-memebers">
+        <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml" name="testCreatePaymentGroupAndMember"/>
     </test-case>
     
     <!--Test case for voiding payments -->