Author: hansbak
Date: Mon Dec 26 03:05:55 2011 New Revision: 1224671 URL: http://svn.apache.org/viewvc?rev=1224671&view=rev Log: fix junit test group order Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/test/GroupOrderTest.xml Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/test/GroupOrderTest.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/GroupOrderTest.xml?rev=1224671&r1=1224670&r2=1224671&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/test/GroupOrderTest.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/test/GroupOrderTest.xml Mon Dec 26 03:05:55 2011 @@ -24,9 +24,10 @@ under the License. <simple-method method-name="testGroupOrderLimitReached" short-description="Test GroupOrder the limit is reached" login-required="false"> <!-- Test GroupOrder the limit is reached Step 1) Create ProductGroupOrder . - Step 2) Create order. + Step 2) Create an order. Step 3) Check soldOrderQty is added. - Step 4) Check Order Item should approved. + Step 4) Check ProductGroupOrder expired. + Step 5) Check Order Item should approved. --> <!-- Step 1 --> <now-timestamp field="nowTimestamp"/> @@ -123,6 +124,10 @@ under the License. <if-compare field="productGroupOrder.soldOrderQty" operator="not-equals" value="0"/> </assert> <!-- Step 4 --> + <set field="checkProductGroupOrderExpiredMap.userLogin" from-field="systemUserLogin"/> + <set field="checkProductGroupOrderExpiredMap.groupOrderId" from-field="productGroupOrder.groupOrderId"/> + <call-service service-name="checkProductGroupOrderExpired" in-map-name="checkProductGroupOrderExpiredMap"/> + <!-- Step 5 --> <entity-condition entity-name="OrderHeader" list="orderHeaders"> <condition-expr field-name="orderTypeId" value="SALES_ORDER"/> <order-by field-name="-orderDate"/> @@ -143,9 +148,10 @@ under the License. <simple-method method-name="testGroupOrderLimitNotReached" short-description="Test GroupOrder the limit is not reached" login-required="false"> <!-- Test GroupOrder the limit is not reached Step 1) Create ProductGroupOrder. - Step 2) Create order. - Step 2) Check ProductGroupOrder expired. - Step 3) Check Order Item should cancelled. + Step 2) Create an order. + Step 3) Check soldOrderQty is added. + Step 4) Check ProductGroupOrder expired. + Step 5) Check Order Item should cancelled. --> <!-- Step 1 --> <now-timestamp field="nowTimestamp"/> @@ -238,10 +244,14 @@ under the License. <entity-one entity-name="ProductGroupOrder" value-field="productGroupOrder"> <field-map field-name="groupOrderId" from-field="groupOrderId"/> </entity-one> + <assert> + <if-compare field="productGroupOrder.soldOrderQty" operator="not-equals" value="0"/> + </assert> + <!-- Step 4 --> <set field="checkProductGroupOrderExpiredMap.userLogin" from-field="systemUserLogin"/> <set field="checkProductGroupOrderExpiredMap.groupOrderId" from-field="productGroupOrder.groupOrderId"/> <call-service service-name="checkProductGroupOrderExpired" in-map-name="checkProductGroupOrderExpiredMap"/> - <!-- Step 4 --> + <!-- Step 5 --> <entity-condition entity-name="OrderHeader" list="orderHeaders"> <condition-expr field-name="orderTypeId" value="SALES_ORDER"/> <order-by field-name="-orderDate"/> |
Free forum by Nabble | Edit this page |