Author: jleroux Date: Thu Oct 3 11:46:18 2019 New Revision: 1867928 URL: http://svn.apache.org/viewvc?rev=1867928&view=rev Log: Improved: Unit test case for service - SendOrderBackorderNotification (OFBIZ-8810)
As Suraj somehow mentioned at https://markmail.org/message/zlf5chufefekb5r2, we can use the same ticket while converting the test to Groov Tests pass Thanks: Avnindra Sharma for the initial patch (here converted to Groovy) Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy?rev=1867928&r1=1867927&r2=1867928&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy Thu Oct 3 11:46:18 2019 @@ -224,5 +224,15 @@ class OrderTests extends OFBizTestCase { assert serviceResult.emailType.equals("PRDS_ODR_CHANGE") } + void testSendOrderBackorderNotification() { + Map serviceCtx = [ + orderId: 'TEST_DEMO10090', + sendTo: '[email protected]', + userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne() + ] + Map serviceResult = dispatcher.runSync('sendOrderBackorderNotification', serviceCtx) + assert ServiceUtil.isSuccess(serviceResult) + assert serviceResult.emailType.equals("PRDS_ODR_BACKORDER") + } }

