You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mr...@apache.org on 2008/03/28 21:40:50 UTC

svn commit: r642370 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/inventory/InventoryServices.xml testdef/FacilityTest.xml

Author: mrisaliti
Date: Fri Mar 28 13:40:44 2008
New Revision: 642370

URL: http://svn.apache.org/viewvc?rev=642370&view=rev
Log:
A patch from Shubham Goyal "JUnit Test Case for Physical Inventory Adjustment" (OFBIZ-1466) 

Modified:
    ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
    ofbiz/trunk/applications/product/testdef/FacilityTest.xml

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?rev=642370&r1=642369&r2=642370&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml Fri Mar 28 13:40:44 2008
@@ -1219,4 +1219,25 @@
         <entity-one entity-name="InventoryItemLabelAppl" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
+    
+    <!-- Test Physical Inventory Adjustment -->
+    <simple-method method-name="testPhysicalInventoryAdjustment" short-description="Test to create physical inventory and variance" login-required="false">
+        <log level="info" message="====================Create physical inventory and variance test case================================"/>
+        <set field="createPhysicalInventoryAndVarianceMap.inventoryItemId" value="9024"/>
+        <set field="createPhysicalInventoryAndVarianceMap.varianceReasonId" value="VAR_LOST"/>
+        <entity-one entity-name="UserLogin" value-name="createPhysicalInventoryAndVarianceMap.userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <call-service service-name="createPhysicalInventoryAndVariance" in-map-name="createPhysicalInventoryAndVarianceMap">
+            <result-to-field result-name="physicalInventoryId" field-name="physicalInventoryId"/>
+        </call-service>
+        <assert>
+            <not>
+                <if-empty field-name="physicalInventoryId">
+                    <log level="info" message="========physicalInventoryId ${physicalInventoryId} found null============================"/>
+                </if-empty>
+            </not>
+        </assert>
+        <check-errors/>
+    </simple-method>
 </simple-methods>

Modified: ofbiz/trunk/applications/product/testdef/FacilityTest.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/testdef/FacilityTest.xml?rev=642370&r1=642369&r2=642370&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/testdef/FacilityTest.xml (original)
+++ ofbiz/trunk/applications/product/testdef/FacilityTest.xml Fri Mar 28 13:40:44 2008
@@ -27,4 +27,8 @@
     <test-case case-name="inventoryItemTransfer-test">
         <junit-test-suite class-name="org.ofbiz.product.test.InventoryItemTransferTest"/>
     </test-case>    
+    <!-- Physical Inventory Adjustment test -->
+    <test-case case-name="physicalInventoryAdjustment-test">
+        <simple-method-test location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" name="testPhysicalInventoryAdjustment"/>
+    </test-case>
 </test-suite>