This is an automated email from the ASF dual-hosted git repository.

pgil pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 5a93726dc Fix Ecommerce Groovy tests (OFBIZ-13009)
5a93726dc is described below

commit 5a93726dcb99a8c350cf7dad98b424b54885ff8d
Author: Gil Portenseigne <gil.portensei...@nereide.fr>
AuthorDate: Thu Apr 11 18:13:33 2024 +0200

    Fix Ecommerce Groovy tests (OFBIZ-13009)
    
    Fix some codenarc rule violation.
---
 .../ecommerce/order/test/OrderNotificationTests.groovy    | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git 
a/ecommerce/src/main/groovy/org/apache/ofbiz/ecommerce/order/test/OrderNotificationTests.groovy
 
b/ecommerce/src/main/groovy/org/apache/ofbiz/ecommerce/order/test/OrderNotificationTests.groovy
index fddd69bc4..60b6653c3 100644
--- 
a/ecommerce/src/main/groovy/org/apache/ofbiz/ecommerce/order/test/OrderNotificationTests.groovy
+++ 
b/ecommerce/src/main/groovy/org/apache/ofbiz/ecommerce/order/test/OrderNotificationTests.groovy
@@ -22,11 +22,11 @@ import org.apache.ofbiz.service.ServiceUtil
 import org.apache.ofbiz.service.testtools.OFBizTestCase
 
 class OrderNotificationTests extends OFBizTestCase {
+
     public OrderNotificationTests(String name) {
         super(name)
     }
-    
-    
+
     void testSendOrderConfirmation() {
         Map serviceCtx = [
             orderId: 'TEST_DEMO10090',
@@ -35,7 +35,7 @@ class OrderNotificationTests extends OFBizTestCase {
         ]
         Map serviceResult = dispatcher.runSync('sendOrderConfirmation', 
serviceCtx)
         assert ServiceUtil.isSuccess(serviceResult)
-        assert serviceResult.emailType.equals("PRDS_ODR_CONFIRM")
+        assert serviceResult.emailType == 'PRDS_ODR_CONFIRM'
     }
     void testSendOrderChangeNotification() {
         Map serviceCtx = [
@@ -47,7 +47,7 @@ class OrderNotificationTests extends OFBizTestCase {
         ]
         Map serviceResult = dispatcher.runSync('sendOrderChangeNotification', 
serviceCtx)
         assert ServiceUtil.isSuccess(serviceResult)
-        assert serviceResult.emailType.equals("PRDS_ODR_CHANGE")
+        assert serviceResult.emailType == 'PRDS_ODR_CHANGE'
     }
     void testSendOrderBackorderNotification() {
         Map serviceCtx = [
@@ -57,7 +57,7 @@ class OrderNotificationTests extends OFBizTestCase {
         ]
         Map serviceResult = 
dispatcher.runSync('sendOrderBackorderNotification', serviceCtx)
         assert ServiceUtil.isSuccess(serviceResult)
-        assert serviceResult.emailType.equals("PRDS_ODR_BACKORDER")
+        assert serviceResult.emailType == 'PRDS_ODR_BACKORDER'
     }
     void testsendOrderPayRetryNotification() {
         Map serviceCtx = [
@@ -67,7 +67,7 @@ class OrderNotificationTests extends OFBizTestCase {
         ]
         Map serviceResult = 
dispatcher.runSync('sendOrderPayRetryNotification', serviceCtx)
         assert ServiceUtil.isSuccess(serviceResult)
-        assert serviceResult.emailType.equals("PRDS_ODR_PAYRETRY")
+        assert serviceResult.emailType == 'PRDS_ODR_PAYRETRY'
     }
     void testsendOrderCompleteNotification() {
         Map serviceCtx = [
@@ -77,6 +77,7 @@ class OrderNotificationTests extends OFBizTestCase {
         ]
         Map serviceResult = 
dispatcher.runSync('sendOrderCompleteNotification', serviceCtx)
         assert ServiceUtil.isSuccess(serviceResult)
-        assert serviceResult.emailType.equals("PRDS_ODR_COMPLETE")
+        assert serviceResult.emailType == 'PRDS_ODR_COMPLETE'
     }
+
 }

Reply via email to