Author: surajk
Date: Sat Jun 22 12:15:45 2019
New Revision: 1861858
URL: http://svn.apache.org/viewvc?rev=1861858&view=rev
Log:
Improved: Unit test case for service - CheckCreateStockRequirementQoh.
(OFBIZ-8939)
Thanks Avnindra Sharma for reporting the ticket and Anushi Gupta for providing
the updated patch.
Modified:
ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
Modified:
ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy?rev=1861858&r1=1861857&r2=1861858&view=diff
==============================================================================
---
ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
(original)
+++
ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
Sat Jun 22 12:15:45 2019
@@ -121,10 +121,19 @@ class OrderTests extends GroovyScriptTes
}
void testGetReturnAmountByOrder() {
Map serviceCtx = [
- returnId: '1009',
- userLogin:
EntityQuery.use(delegator).from('UserLogin').where('userLoginId',
'system').cache().queryOne()
+ returnId: '1009',
+ userLogin:
EntityQuery.use(delegator).from('UserLogin').where('userLoginId',
'system').cache().queryOne()
]
Map serviceResult = dispatcher.runSync('getReturnAmountByOrder',
serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
}
+ void testCheckCreateStockRequirementQoh() {
+ Map serviceCtx = [
+ orderId: 'TEST_DEMO10090',
+ orderItemSeqId: '00001',
+ userLogin:
EntityQuery.use(delegator).from('UserLogin').where('userLoginId',
'system').cache().queryOne()
+ ]
+ Map serviceResult =
dispatcher.runSync('checkCreateStockRequirementQoh', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
}
\ No newline at end of file