[ofbiz-framework] branch trunk updated: In previous commit 2b041186909982f37b6a32688fe910d65b6d0fad for

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

[ofbiz-framework] branch trunk updated: In previous commit 2b041186909982f37b6a32688fe910d65b6d0fad for

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1542844  In previous commit 2b041186909982f37b6a32688fe910d65b6d0fad for
1542844 is described below

commit 1542844add7c5ac179c064b7c86627c7bc0c8bb5
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sat Jul 25 16:59:30 2020 +0200

    In previous commit 2b041186909982f37b6a32688fe910d65b6d0fad for
   
    Revert "Improved: Convert voidPayment service from mini-lang to groovy DSL (OFBIZ-11487)"
    This reverts commit faa59b325fc50fc58b578c2b5d9b6d50d21b2478.
   
    I wrongly put back 2 files not part of faa59b325 commit
    CostTests.xml
    ProductPriceTests.xml
   
    This removes them
---
 .../product/minilang/product/test/CostTests.xml    | 90 ----------------------
 .../minilang/product/test/ProductPriceTests.xml    | 66 ----------------
 2 files changed, 156 deletions(-)

diff --git a/applications/product/minilang/product/test/CostTests.xml b/applications/product/minilang/product/test/CostTests.xml
deleted file mode 100644
index f7ddc68..0000000
--- a/applications/product/minilang/product/test/CostTests.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
-    <simple-method method-name="testCalculateProductStandardCosts" short-description="Test case for service calculateProductCosts" 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="calculateProductCosts" in-map-name="serviceCtx"/>
-
-        <entity-and entity-name="CostComponent" list="costComponents">
-            <field-map field-name="productId" from-field="productId"/>
-        </entity-and>
-        <filter-list-by-date list="costComponents"/>
-        <set field="costTotalAmount" value="0.0" type="BigDecimal"/>
-        <iterate list="costComponents" entry="costComponent">
-            <assert>
-                <if-compare field="costComponent.costUomId" operator="equals" value="USD"/>
-                <or>
-                    <and>
-                        <if-compare field="costComponent.costComponentTypeId" operator="equals" value="EST_STD_ROUTE_COST"/>
-                        <if-compare field="costComponent.cost" operator="equals" value="10.00" type="BigDecimal"/>
-                    </and>
-                    <and>
-                        <if-compare field="costComponent.costComponentTypeId" operator="equals" value="EST_STD_MAT_COST"/>
-                        <if-compare field="costComponent.cost" operator="equals" value="39.00" type="BigDecimal"/>
-                    </and>
-                    <and>
-                        <if-compare field="costComponent.costComponentTypeId" operator="equals" value="EST_STD_OTHER_COST"/>
-                        <if-compare field="costComponent.cost" operator="equals" value="31.00" type="BigDecimal"/>
-                    </and>
-                    <and>
-                        <!--<if-compare field="costComponent.costComponentCalcId" operator="equals" value="GEN_COST_CALC"/>-->
-                        <if-compare field="costComponent.costComponentTypeId" operator="equals" value="EST_STD_GEN_COST"/>
-                        <if-compare field="costComponent.cost" operator="equals" value="4.00" type="BigDecimal"/>
-                    </and>
-                </or>
-            </assert>
-            <set field="costTotalAmount" value="${costTotalAmount + costComponent.cost}" type="BigDecimal"/>
-        </iterate>
-        <assert>
-            <if-compare field="costTotalAmount" operator="equals" value="84.00" type="BigDecimal"/>
-        </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>
diff --git a/applications/product/minilang/product/test/ProductPriceTests.xml b/applications/product/minilang/product/test/ProductPriceTests.xml
deleted file mode 100644
index 335207a..0000000
--- a/applications/product/minilang/product/test/ProductPriceTests.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
-    <simple-method method-name="testCalculateProductPrice" short-description="Test case for service calculateProductPrice" login-required="false">
-        <set field="productId" value="GZ-2002"/>
-        <entity-one entity-name="Product" value-field="product"/>
-        <set field="serviceCtx.product" from-field="product"/>
-        <call-service service-name="calculateProductPrice" in-map-name="serviceCtx">
-            <results-to-map map-name="resultMap"/>
-        </call-service>
-        <assert>
-            <if-compare field="resultMap.defaultPrice" operator="equals" value="47.99" type="BigDecimal"/>
-            <if-compare field="resultMap.listPrice" operator="equals" value="48" type="BigDecimal"/>
-        </assert>
-        <check-errors/>
-    </simple-method>
-
-    <simple-method method-name="testCalculateProductPriceOfVariantProduct" short-description="Test case for service calculateProductPrice, when product is a variant and does not have product price" login-required="false">
-        <!-- If product is a variant and no price is set, then default price of virtual product will be set -->
-        <set field="productId" value="GZ-1006-3"/>
-        <entity-one entity-name="Product" value-field="product"/>
-        <set field="serviceCtx.product" from-field="product"/>
-        <call-service service-name="calculateProductPrice" in-map-name="serviceCtx">
-            <results-to-map map-name="resultMap"/>
-        </call-service>
-        <assert>
-            <if-compare field="resultMap.defaultPrice" operator="equals" value="1.99" type="BigDecimal"/>
-            <if-compare field="resultMap.listPrice" operator="equals" value="5.99" type="BigDecimal"/>
-        </assert>
-        <check-errors/>
-    </simple-method>
-
-    <simple-method method-name="testCalculateProductPriceOfVirtualProduct" short-description="Test case for service calculateProductPrice, when product is virtual and does not have product price set" login-required="false">
-        <!--  If product is a virtual and no price is set then then the service return price of a variant product which have lowest DEFAULT_PRICE. It is also considered whether the product is discontinued for sale before using the lowest price against a variant for a virtual product  -->
-        <set field="productId" value="DemoProduct"/>
-        <entity-one entity-name="Product" value-field="product"/>
-        <set field="serviceCtx.product" from-field="product"/>
-        <call-service service-name="calculateProductPrice" in-map-name="serviceCtx">
-            <results-to-map map-name="resultMap"/>
-        </call-service>
-        <assert>
-            <if-compare field="resultMap.defaultPrice" operator="equals" value="10" type="BigDecimal"/>
-        </assert>
-        <check-errors/>
-    </simple-method>
-</simple-methods>