Skip to content

Commit

Permalink
Improved: Moves groovy scripts to src and adds a package declaration to
Browse files Browse the repository at this point in the history
all of them (OFBIZ-12813)

Replaces UtilValidate.isNotEmpty() by Groovy Truth
  • Loading branch information
JacquesLeRoux committed Mar 30, 2024
1 parent 1268ed3 commit 298a649
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package org.apache.accounting.accounting

import org.apache.ofbiz.base.util.UtilValidate
import org.apache.ofbiz.entity.GenericValue
import org.apache.ofbiz.order.shoppingcart.CheckOutEvents
import org.apache.ofbiz.order.shoppingcart.ShoppingCartEvents
Expand Down Expand Up @@ -47,7 +46,7 @@ class InvoicePerShipmentTests extends OFBizTestCase {
Step 4) Check invoice should not created.
*/
List invoices = testInvoicePerShipment('GZ-1000', 'N')
assert UtilValidate.isEmpty(invoices)
assert invoices
}

void testInvoicePerShipmentSetTrue() {
Expand All @@ -58,7 +57,7 @@ class InvoicePerShipmentTests extends OFBizTestCase {
Step 4) Check invoice should be created.
*/
List invoices = testInvoicePerShipment('GZ-1000', 'Y')
assert UtilValidate.isNotEmpty(invoices)
assert !invoices
}

void testInvoicePerShipmentSetOrderFalse() {
Expand All @@ -68,7 +67,7 @@ class InvoicePerShipmentTests extends OFBizTestCase {
Step 3) Check invoice should not be created.
*/
List invoices = testInvoicePerShipment('GZ-2644', 'N')
assert UtilValidate.isEmpty(invoices)
assert invoices
}

void testInvoicePerShipmentSetOrderTrue() {
Expand All @@ -78,7 +77,7 @@ class InvoicePerShipmentTests extends OFBizTestCase {
Step 3) Check invoice should be created.
*/
List invoices = testInvoicePerShipment('GZ-2644', 'Y')
assert UtilValidate.isNotEmpty(invoices)
assert !invoices
}

private List testInvoicePerShipment(String productId, String invoicePerShipment) {
Expand Down

0 comments on commit 298a649

Please sign in to comment.