|
Author: jacopoc
Date: Mon Feb 15 16:32:02 2010 New Revision: 910252 URL: http://svn.apache.org/viewvc?rev=910252&view=rev Log: Enhancements to the test for the createProductionRunForOrder service: testing that reservations for items produced by the production run are correctly associated to the order. Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml?rev=910252&r1=910251&r2=910252&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml (original) +++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml Mon Feb 15 16:32:02 2010 @@ -845,6 +845,25 @@ <assert><not><if-empty field="orderId"/></not></assert> <check-errors/> + <entity-and list="orderItems" entity-name="OrderItem"> + <field-map field-name="orderId" from-field="orderId"/> + <field-map field-name="productId" from-field="productId"/> + </entity-and> + <first-from-list entry="orderItem" list="orderItems"/> + <assert> + <not><if-empty field="orderItem"/></not> + </assert> + <check-errors/> + <entity-and list="orderItemShipGrpInvRess" entity-name="OrderItemShipGrpInvRes"> + <field-map field-name="orderId" from-field="orderId"/> + <field-map field-name="orderItemSeqId" from-field="orderItem.orderItemSeqId"/> + </entity-and> + <first-from-list entry="originalOrderItemShipGrpInvRes" list="orderItemShipGrpInvRess"/> + <assert> + <not><if-empty field="originalOrderItemShipGrpInvRes"/></not> + </assert> + <check-errors/> + <clear-field field="serviceCtx"/> <set field="serviceCtx.userLogin" from-field="userLogin"/> <set field="serviceCtx.orderId" from-field="orderId"/> @@ -893,6 +912,35 @@ <not><if-empty field="workOrderItemFulfillment.orderItemSeqId"/></not> </assert> <check-errors/> + + <clear-field field="serviceCtx"/> + <set field="serviceCtx.userLogin" from-field="userLogin"/> + <set field="serviceCtx.productionRunId" from-field="productionRunId"/> + <set field="serviceCtx.statusId" value="PRUN_DOC_PRINTED"/> + <call-service service-name="quickChangeProductionRunStatus" in-map-name="serviceCtx"/> + <clear-field field="serviceCtx"/> + <set field="serviceCtx.userLogin" from-field="userLogin"/> + <set field="serviceCtx.productionRunId" from-field="productionRunId"/> + <set field="serviceCtx.statusId" value="PRUN_CLOSED"/> + <call-service service-name="quickChangeProductionRunStatus" in-map-name="serviceCtx"/> + + <entity-and list="producedMaterials" entity-name="WorkEffortAndInventoryProduced"> + <field-map field-name="workEffortId" from-field="productionRunHeader.workEffortId"/> + </entity-and> + <first-from-list entry="producedMaterial" list="producedMaterials"/> + + <entity-and list="orderItemShipGrpInvRess" entity-name="OrderItemShipGrpInvRes"> + <field-map field-name="orderId" from-field="orderId"/> + <field-map field-name="orderItemSeqId" from-field="orderItem.orderItemSeqId"/> + </entity-and> + <first-from-list entry="newOrderItemShipGrpInvRes" list="orderItemShipGrpInvRess"/> + <assert> + <not><if-empty field="newOrderItemShipGrpInvRes"/></not> + <not><if-compare-field field="newOrderItemShipGrpInvRes.inventoryItemId" operator="equals" to-field="originalOrderItemShipGrpInvRes.inventoryItemId"/></not> + <if-compare-field field="producedMaterial.inventoryItemId" operator="equals" to-field="newOrderItemShipGrpInvRes.inventoryItemId"/> + <not><if-compare-field field="producedMaterial.inventoryItemId" operator="equals" to-field="newOrderItemShipGrpInvRes.inventoryItemId"/></not> + </assert> + </simple-method> </simple-methods> \ No newline at end of file |
| Free forum by Nabble | Edit this page |
