svn commit: r894606 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml

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

svn commit: r894606 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml

mor-2
Author: mor
Date: Wed Dec 30 13:08:36 2009
New Revision: 894606

URL: http://svn.apache.org/viewvc?rev=894606&view=rev
Log:
A test case for updateFixedAssetMaintAndWorkEffort service.

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml?rev=894606&r1=894605&r2=894606&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml Wed Dec 30 13:08:36 2009
@@ -240,4 +240,29 @@
         </assert>
         <check-errors/>
     </simple-method>
+
+    <simple-method method-name="testUpdateFixedAssetMaintAndWorkEffort" short-description="Test case for service updateFixedAssetMaintAndWorkEffort" login-required="false">
+        <set field="fixedAssetId" value="DEMO_VEHICLE_01"/>
+        <set field="maintHistSeqId" value="00001"/><!-- Sequence created by testCreateFixedAssetMaintUpdateWorkEffortWithProductMaint -->
+        <set field="serviceCtx.fixedAssetId" from-field="fixedAssetId"/>
+        <set field="serviceCtx.maintHistSeqId" from-field="maintHistSeqId"/>
+        <set field="serviceCtx.actualCompletionDate" value="2009-12-22 01:00:00.000" type="Timestamp"/><!-- Changed actualCompletionDate to test update service -->
+        <entity-one entity-name="FixedAssetMaint" value-field="fixedAssetMaint"/>
+        <set field="serviceCtx.workEffortId" from-field="fixedAssetMaint.scheduleWorkEffortId"/>
+        <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="updateFixedAssetMaintAndWorkEffort" in-map-name="serviceCtx"/>
+        <clear-field field="fixedAssetMaint"/>
+        <entity-one entity-name="FixedAssetMaint" value-field="fixedAssetMaint"/>
+        <get-related-one relation-name="ScheduleWorkEffort" value-field="fixedAssetMaint" to-value-field="workEffort"/>
+        <assert>
+            <not><if-empty field="fixedAssetMaint"/></not>
+            <not><if-empty field="fixedAssetMaint.scheduleWorkEffortId"/></not>
+            <not><if-empty field="workEffort"/></not>
+            <if-compare-field field="workEffort.actualCompletionDate" operator="equals" to-field="serviceCtx.actualCompletionDate"/>
+        </assert>
+        <check-errors/>
+    </simple-method>
 </simple-methods>
\ No newline at end of file