Improved: Unit test case for service - ProcessRefundReturnForReplacement

(OFBIZ-8868)

OrderTests.groovy has been splitter in other files, this test fits in 
OrderReturnTests.groovy

Thanks: Avnindra Sharma for initial test and Suraj for Groovy conversion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868388 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2019-10-13 09:32:19 +00:00
parent 3745506c50
commit 4eb321b8a1
@@ -207,4 +207,12 @@ class OrderReturnTests extends OFBizTestCase {
assert ServiceUtil.isSuccess(serviceResult)
assert serviceResult.returnId != null
}
void testProcessRefundReturnForReplacement() {
Map serviceCtx = [
orderId: 'TEST_DEMO10090',
userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
]
Map serviceResult = dispatcher.runSync('processRefundReturnForReplacement', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
}
}