svn commit: r909985 - /ofbiz/trunk/applications/product/script/org/ofbiz/product/test/CostTests.xml

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

svn commit: r909985 - /ofbiz/trunk/applications/product/script/org/ofbiz/product/test/CostTests.xml

jacopoc
Author: jacopoc
Date: Sun Feb 14 08:34:48 2010
New Revision: 909985

URL: http://svn.apache.org/viewvc?rev=909985&view=rev
Log:
Automated test for service getProductCost

Modified:
    ofbiz/trunk/applications/product/script/org/ofbiz/product/test/CostTests.xml

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/test/CostTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/CostTests.xml?rev=909985&r1=909984&r2=909985&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/test/CostTests.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/test/CostTests.xml Sun Feb 14 08:34:48 2010
@@ -68,4 +68,23 @@
         </assert>
         <check-errors/>
     </simple-method>
+    <simple-method method-name="testGetProductCost" short-description="Test case for service getProductCost" login-required="false">
+        <set field="productId" value="PROD_MANUF"/>
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="admin"/>
+        </entity-one>
+
+        <set field="serviceCtx.userLogin" from-field="userLogin"/>
+        <set field="serviceCtx.productId" from-field="productId"/>
+        <set field="serviceCtx.currencyUomId" value="USD"/>
+        <set field="serviceCtx.costComponentTypePrefix" value="EST_STD"/>
+        <call-service service-name="getProductCost" in-map-name="serviceCtx">
+            <result-to-field result-name="productCost"/>
+        </call-service>
+
+        <assert>
+            <if-compare field="productCost" operator="equals" value="84.00" type="BigDecimal"/>
+        </assert>
+        <check-errors/>
+    </simple-method>
 </simple-methods>