From c6d04f2c890c0d01c0d95765a354f51e66cd355c Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Mon, 28 Oct 2024 03:16:18 +0800 Subject: [PATCH] Fix UTs --- .../Orders/OrdersAppServiceTests.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/Coupons/test/EasyAbp.EShop.Orders.Plugins.Coupons.Tests/Orders/OrdersAppServiceTests.cs b/plugins/Coupons/test/EasyAbp.EShop.Orders.Plugins.Coupons.Tests/Orders/OrdersAppServiceTests.cs index 3e268e14..587cac8c 100644 --- a/plugins/Coupons/test/EasyAbp.EShop.Orders.Plugins.Coupons.Tests/Orders/OrdersAppServiceTests.cs +++ b/plugins/Coupons/test/EasyAbp.EShop.Orders.Plugins.Coupons.Tests/Orders/OrdersAppServiceTests.cs @@ -96,7 +96,6 @@ namespace EasyAbp.EShop.Plugins.Coupons.Coupons await Should.ThrowAsync(() => orderGenerator.GenerateAsync(Guid.NewGuid(), createOrderInfoModel, dic, new Dictionary())); - return; } else { @@ -107,6 +106,11 @@ namespace EasyAbp.EShop.Plugins.Coupons.Coupons //assert + if (throws) + { + return; + } + var orderLine = order.OrderLines[0]; var orderLine2ExpectedPrice = 1 * prodoctSku.Price - discountAmount;