Author: mor
Date: Sat Feb  6 07:03:38 2010
New Revision: 907179

URL: http://svn.apache.org/viewvc?rev=907179&view=rev
Log:
Added a test case to check QOH and ATP for a product in a facility. Also 
removed a comment for the test definition file that is no longer valid.

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

Modified: 
ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml?rev=907179&r1=907178&r2=907179&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
 (original)
+++ 
ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
 Sat Feb  6 07:03:38 2010
@@ -21,6 +21,20 @@
 <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="testGetInventoryAvailableByFacility" 
short-description="Test case for service getInventoryAvailableByFacility" 
login-required="false">
+        <set field="serviceCtx.productId" value="GZ-2644"/>
+        <set field="serviceCtx.facilityId" value="WebStoreWarehouse"/>
+        <call-service service-name="getInventoryAvailableByFacility" 
in-map-name="serviceCtx">
+            <result-to-field result-name="quantityOnHandTotal"/>
+            <result-to-field result-name="availableToPromiseTotal"/>
+        </call-service>
+        <assert>
+            <if-compare field="quantityOnHandTotal" operator="equals" 
value="509" type="BigDecimal"/>
+            <if-compare field="availableToPromiseTotal" operator="equals" 
value="509" type="BigDecimal"/>
+        </assert>
+        <check-errors/>
+    </simple-method>
+
     <!-- Test Physical Inventory Adjustment -->
     <simple-method method-name="testCreatePhysicalInventoryAndVariance" 
short-description="Test to create physical inventory and variance" 
login-required="false">
         <set field="serviceCtx.inventoryItemId" value="9024"/>

Modified: ofbiz/trunk/applications/product/testdef/FacilityTest.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/testdef/FacilityTest.xml?rev=907179&r1=907178&r2=907179&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/testdef/FacilityTest.xml (original)
+++ ofbiz/trunk/applications/product/testdef/FacilityTest.xml Sat Feb  6 
07:03:38 2010
@@ -27,7 +27,6 @@
     <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="inventory-tests">
         <simple-method-test 
location="component://product/script/org/ofbiz/product/test/InventoryTests.xml"/>
     </test-case>


Reply via email to