svn commit: r654836 - in /ofbiz/trunk/applications/product: script/org/ofbiz/shipment/test/TestServices.xml testdef/FacilityTest.xml

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

svn commit: r654836 - in /ofbiz/trunk/applications/product: script/org/ofbiz/shipment/test/TestServices.xml testdef/FacilityTest.xml

mor-2
Author: mor
Date: Fri May  9 07:56:05 2008
New Revision: 654836

URL: http://svn.apache.org/viewvc?rev=654836&view=rev
Log:
Applied patch for testing shipment process from Jira Issue OFBIZ-1759 (https://issues.apache.org/jira/browse/OFBIZ-1759), Thanks Ratnesh Upadhyay and Brajesh Patel for the patch

Modified:
    ofbiz/trunk/applications/product/script/org/ofbiz/shipment/test/TestServices.xml
    ofbiz/trunk/applications/product/testdef/FacilityTest.xml

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/test/TestServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/test/TestServices.xml?rev=654836&r1=654835&r2=654836&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/test/TestServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/test/TestServices.xml Fri May  9 07:56:05 2008
@@ -105,4 +105,51 @@
         <log level="info" message="=============Test case completed===================================="/>
         
     </simple-method>
+    
+    <simple-method method-name="testShipmentServices" short-description="test shipment services" login-required="false">
+        <set field="createShipmentInMap.shipmentTypeId" value="SALES_SHIPMENT"/>
+        <set field="createShipmentInMap.statusId" value="SHIPMENT_PACKED"/>
+        <set field="createShipmentInMap.primaryOrderId" value="DEMO10090"/>
+        <set field="createShipmentInMap.partyIdTo" value="DemoCustomer"/>
+        <set field="createShipmentInMap.originFacilityId" value="WebStoreWarehouse"/>
+        <entity-one entity-name="UserLogin" value-name="userLogin" auto-field-map="false">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="createShipmentInMap.userLogin" from-field="userLogin"/>
+        
+        <call-service service-name="createShipment" in-map-name="createShipmentInMap">
+            <results-to-map map-name="createShipmentOutMap"/>
+        </call-service>
+        
+        <log level="info" message="==========Shipment Id============${createShipmentOutMap.shipmentId}=========="/>
+        
+        <set field="updateShipmentInMap.shipmentId" from-field="createShipmentOutMap.shipmentId" />
+        <set field="updateShipmentInMap.statusId" value="SHIPMENT_SHIPPED"/>
+        <set field="updateShipmentInMap.userLogin" from-field="userLogin"/>
+        <call-service service-name="updateShipment" in-map-name="updateShipmentInMap">
+            <results-to-map map-name="updateShipmentOutMap"/>
+        </call-service>
+        <log level="info" message="=============Update Shipment Id=============${updateShipmentOutMap.shipmentId}========================="/>
+        
+        <entity-one entity-name="Shipment" value-name="shipment">
+            <field-map field-name="shipmentId" env-name="updateShipmentOutMap.shipmentId"/>
+        </entity-one>
+        
+        <assert>
+        <not><if-empty field-name="shipment"/></not>
+        <if-compare-field field-name="shipment.shipmentId" operator="equals" to-field-name="updateShipmentOutMap.shipmentId"/>
+        <if-compare-field field-name="shipment.statusId" operator="equals" to-field-name="updateShipmentInMap.statusId"/>
+        </assert>
+        <check-errors/>
+
+        <set field="sendShipmentCompleteNotificationInMap.shipmentId" from-field="updateShipmentOutMap.shipmentId"/>
+        <set field="sendShipmentCompleteNotificationInMap.userLogin" from-field="userLogin"/>
+        
+        <call-service service-name="sendShipmentCompleteNotification" in-map-name="sendShipmentCompleteNotificationInMap">
+            <results-to-map map-name="sendShipmentCompleteNotificationOutMap"/>
+        </call-service>
+        
+        <log level="info" message="=============Shipment Notification ===========${sendShipmentCompleteNotificationOutMap}========="/>
+        <log level="info" message="=============Test case completed===================================="/>
+    </simple-method>
 </simple-methods>
\ No newline at end of file

Modified: ofbiz/trunk/applications/product/testdef/FacilityTest.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/testdef/FacilityTest.xml?rev=654836&r1=654835&r2=654836&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/testdef/FacilityTest.xml (original)
+++ ofbiz/trunk/applications/product/testdef/FacilityTest.xml Fri May  9 07:56:05 2008
@@ -36,4 +36,7 @@
     <test-case case-name="testPackingServices-test">
         <simple-method-test location="component://product/script/org/ofbiz/shipment/test/TestServices.xml" name="testPackingServices"/>
     </test-case>
+    <test-case case-name="testShipmentServices-test">
+        <simple-method-test location="component://product/script/org/ofbiz/shipment/test/TestServices.xml" name="testShipmentServices"/>
+    </test-case>
 </test-suite>
\ No newline at end of file