You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2016/11/05 09:18:56 UTC

svn commit: r1768167 - /ofbiz/trunk/applications/accounting/minilang/test/AutoAcctgFinAccountTests.xml

Author: deepak
Date: Sat Nov  5 09:18:56 2016
New Revision: 1768167

URL: http://svn.apache.org/viewvc?rev=1768167&view=rev
Log:
Improved: Corrected sequence of FinAccount test cases, as it delete the rule in one case and in next case it try to update the deleted data. Now it will fixed the test case failing issue. 
 
(OFBIZ-8814)

Modified:
    ofbiz/trunk/applications/accounting/minilang/test/AutoAcctgFinAccountTests.xml

Modified: ofbiz/trunk/applications/accounting/minilang/test/AutoAcctgFinAccountTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/minilang/test/AutoAcctgFinAccountTests.xml?rev=1768167&r1=1768166&r2=1768167&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/minilang/test/AutoAcctgFinAccountTests.xml (original)
+++ ofbiz/trunk/applications/accounting/minilang/test/AutoAcctgFinAccountTests.xml Sat Nov  5 09:18:56 2016
@@ -20,24 +20,79 @@ under the License.
 
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
-    <simple-method method-name="testDeleteFinAccountRole" short-description="Test case for service deleteFinAccountRole" login-required="false">
-        <set field="serviceCtx.finAccountId" value="1004"/>
+    <simple-method method-name="testCreateFinAccount" short-description="Test case for service createFinAccount" login-required="false">
+        <set field="serviceCtx.finAccountId" value="1000"/>
+        <set field="serviceCtx.finAccountTypeId" value="BANK_ACCOUNT"/>
+        <set field="serviceCtx.finAccountName" value="Bank Account" />
+        <set field="serviceCtx.finAccountCode" value="1000"/>
+        <set field="serviceCtx.currencyUomId" value="USD"/>
+        <set field="serviceCtx.organizationPartyId" value="DEMO_COMPANY"/>
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="serviceCtx.userLogin" from-field="userLogin"/>
+        <call-service service-name="createFinAccount" in-map-name="serviceCtx"/>
+        <entity-one entity-name="FinAccount" value-field="finAccount">
+            <field-map field-name="finAccountId" value="1000"/>
+        </entity-one>
+        <assert>
+            <not><if-empty field="finAccount"/></not>
+            <if-compare operator="equals" value="BANK_ACCOUNT" field="finAccount.finAccountTypeId"></if-compare>
+            <if-compare operator="equals" value="1000" field="finAccount.finAccountCode"></if-compare>
+        </assert>
+        <check-errors/>
+    </simple-method>
+    <simple-method method-name="testUpdateFinAccount" short-description="Test case for service updateFinAccount" login-required="false">
+        <set field="serviceCtx.finAccountId" value="1001"/>
+        <set field="serviceCtx.organizationPartyId" value="DEMO_COMPANY2"/>
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="serviceCtx.userLogin" from-field="userLogin"/>
+        <call-service service-name="updateFinAccount" in-map-name="serviceCtx"/>
+        <entity-one entity-name="FinAccount" value-field="finAccount">
+            <field-map field-name="finAccountId" value="1001"/>
+        </entity-one>
+        <assert>
+            <not><if-empty field="finAccount"/></not>
+            <if-compare operator="equals" value="DEMO_COMPANY2" field="finAccount.organizationPartyId"></if-compare>
+        </assert>
+        <check-errors/>
+    </simple-method>
+    <simple-method method-name="testDeleteFinAccount" short-description="Test case for service deleteFinAccount" login-required="false">
+        <set field="serviceCtx.finAccountId" value="1002"/>
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="serviceCtx.userLogin" from-field="userLogin"/>
+        <call-service service-name="deleteFinAccount" in-map-name="serviceCtx"/>
+        <entity-one entity-name="FinAccount" value-field="finAccount">
+            <field-map field-name="finAccountId" value="1002"/>
+        </entity-one>
+        <assert>
+            <if-empty field="finAccount"/>
+        </assert>
+        <check-errors/>
+    </simple-method>
+    <simple-method method-name="testCreateFinAccountRole" short-description="Test case for service createFinAccountRole" login-required="false">
+        <now-timestamp field="nowTimestamp"/>
+        <set field="serviceCtx.finAccountId" value="1003"/>
         <set field="serviceCtx.partyId" value="DEMO_COMPANY"/>
-        <set field="serviceCtx.roleTypeId" value="SUPPLIER"/>
-        <set field="serviceCtx.fromDate" value="2016-11-03 00:00:00" type="Timestamp"/>
+        <set field="serviceCtx.roleTypeId" value="INTERNAL_ORGANIZATIO"/>
+        <set field="serviceCtx.fromDate" from-field="nowTimestamp"/>
         <entity-one entity-name="UserLogin" value-field="userLogin">
             <field-map field-name="userLoginId" value="system"/>
         </entity-one>
         <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <call-service service-name="deleteFinAccountRole" in-map-name="serviceCtx"/>
+        <call-service service-name="createFinAccountRole" in-map-name="serviceCtx"/>
         <entity-and list="finAccountRoles" entity-name="FinAccountRole">
-            <field-map field-name="finAccountId" value="1004"/>
+            <field-map field-name="finAccountId" value="1003"/>
             <field-map field-name="partyId" value="DEMO_COMPANY"/>
-            <field-map field-name="roleTypeId" value="SUPPLIER"/>
+            <field-map field-name="roleTypeId" value="INTERNAL_ORGANIZATIO"/>
         </entity-and>
         <first-from-list entry="finAccountRole" list="finAccountRoles"/>
         <assert>
-            <if-empty field="finAccountRole"/>
+            <not><if-empty field="finAccountRole"/></not>
         </assert>
         <check-errors/>
     </simple-method>
@@ -65,25 +120,24 @@ under the License.
         </assert>
         <check-errors/>
     </simple-method>
-    <simple-method method-name="testCreateFinAccountRole" short-description="Test case for service createFinAccountRole" login-required="false">
-        <now-timestamp field="nowTimestamp"/>
-        <set field="serviceCtx.finAccountId" value="1003"/>
+    <simple-method method-name="testDeleteFinAccountRole" short-description="Test case for service deleteFinAccountRole" login-required="false">
+        <set field="serviceCtx.finAccountId" value="1004"/>
         <set field="serviceCtx.partyId" value="DEMO_COMPANY"/>
-        <set field="serviceCtx.roleTypeId" value="INTERNAL_ORGANIZATIO"/>
-        <set field="serviceCtx.fromDate" from-field="nowTimestamp"/>
+        <set field="serviceCtx.roleTypeId" value="SUPPLIER"/>
+        <set field="serviceCtx.fromDate" value="2016-11-03 00:00:00" type="Timestamp"/>
         <entity-one entity-name="UserLogin" value-field="userLogin">
             <field-map field-name="userLoginId" value="system"/>
         </entity-one>
         <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <call-service service-name="createFinAccountRole" in-map-name="serviceCtx"/>
+        <call-service service-name="deleteFinAccountRole" in-map-name="serviceCtx"/>
         <entity-and list="finAccountRoles" entity-name="FinAccountRole">
-            <field-map field-name="finAccountId" value="1003"/>
+            <field-map field-name="finAccountId" value="1004"/>
             <field-map field-name="partyId" value="DEMO_COMPANY"/>
-            <field-map field-name="roleTypeId" value="INTERNAL_ORGANIZATIO"/>
+            <field-map field-name="roleTypeId" value="SUPPLIER"/>
         </entity-and>
         <first-from-list entry="finAccountRole" list="finAccountRoles"/>
         <assert>
-            <not><if-empty field="finAccountRole"/></not>
+            <if-empty field="finAccountRole"/>
         </assert>
         <check-errors/>
     </simple-method>
@@ -125,58 +179,6 @@ under the License.
         </assert>
         <check-errors/>
     </simple-method>
-    <simple-method method-name="testDeleteFinAccount" short-description="Test case for service deleteFinAccount" login-required="false">
-        <set field="serviceCtx.finAccountId" value="1002"/>
-        <entity-one entity-name="UserLogin" value-field="userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <call-service service-name="deleteFinAccount" in-map-name="serviceCtx"/>
-        <entity-one entity-name="FinAccount" value-field="finAccount">
-            <field-map field-name="finAccountId" value="1002"/>
-        </entity-one>
-        <assert>
-            <if-empty field="finAccount"/>
-        </assert>
-        <check-errors/>
-    </simple-method>
-    <simple-method method-name="testUpdateFinAccount" short-description="Test case for service updateFinAccount" login-required="false">
-        <set field="serviceCtx.finAccountId" value="1001"/>
-        <set field="serviceCtx.organizationPartyId" value="DEMO_COMPANY2"/>
-        <entity-one entity-name="UserLogin" value-field="userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <call-service service-name="updateFinAccount" in-map-name="serviceCtx"/>
-        <entity-one entity-name="FinAccount" value-field="finAccount">
-            <field-map field-name="finAccountId" value="1001"/>
-        </entity-one>
-        <assert>
-            <not><if-empty field="finAccount"/></not>
-            <if-compare operator="equals" value="DEMO_COMPANY2" field="finAccount.organizationPartyId"></if-compare>
-        </assert>
-        <check-errors/>
-    </simple-method>
-    <simple-method method-name="testCreateFinAccount" short-description="Test case for service createFinAccount" login-required="false">
-        <set field="serviceCtx.finAccountId" value="1000"/>
-        <set field="serviceCtx.finAccountTypeId" value="BANK_ACCOUNT"/>
-        <set field="serviceCtx.finAccountName" value="Bank Account" />
-        <set field="serviceCtx.finAccountCode" value="1000"/>
-        <set field="serviceCtx.currencyUomId" value="USD"/>
-        <set field="serviceCtx.organizationPartyId" value="DEMO_COMPANY"/>
-        <entity-one entity-name="UserLogin" value-field="userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <call-service service-name="createFinAccount" in-map-name="serviceCtx"/>
-        <entity-one entity-name="FinAccount" value-field="finAccount">
-            <field-map field-name="finAccountId" value="1000"/>
-        </entity-one>
-        <assert>
-            <not><if-empty field="finAccount"/></not>
-            <if-compare operator="equals" value="BANK_ACCOUNT" field="finAccount.finAccountTypeId"></if-compare>
-            <if-compare operator="equals" value="1000" field="finAccount.finAccountCode"></if-compare>
-        </assert>
-        <check-errors/>
-    </simple-method>
+
+
 </simple-methods>
\ No newline at end of file