From fb6945a401d16358afd58ea85c7919bae944afab Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 4 Apr 2024 15:48:31 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E4=BA=BA=E5=A4=A7=E9=87=91=E4=BB=93?= =?UTF-8?q?=20unit=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Asp.NetCore2/KdbndpTest/UnitTest/UThread.cs | 4 ++-- Src/Asp.NetCore2/KdbndpTest/UnitTest/UValidate.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/Asp.NetCore2/KdbndpTest/UnitTest/UThread.cs b/Src/Asp.NetCore2/KdbndpTest/UnitTest/UThread.cs index cfb77905ec..86b73f1600 100644 --- a/Src/Asp.NetCore2/KdbndpTest/UnitTest/UThread.cs +++ b/Src/Asp.NetCore2/KdbndpTest/UnitTest/UThread.cs @@ -25,7 +25,7 @@ public partial class NewUnitTest } } }); - public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig() + public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig() { DbType = DbType.Kdbndp, ConnectionString = Config.ConnectionString, @@ -41,7 +41,7 @@ public partial class NewUnitTest } } }); - public static SqlSugarClient singleDb = new SqlSugarClient(new ConnectionConfig() + public static SqlSugarScope singleDb = new SqlSugarScope(new ConnectionConfig() { DbType = DbType.Kdbndp, ConnectionString = Config.ConnectionString, diff --git a/Src/Asp.NetCore2/KdbndpTest/UnitTest/UValidate.cs b/Src/Asp.NetCore2/KdbndpTest/UnitTest/UValidate.cs index bc2b97fc21..b64608ae00 100644 --- a/Src/Asp.NetCore2/KdbndpTest/UnitTest/UValidate.cs +++ b/Src/Asp.NetCore2/KdbndpTest/UnitTest/UValidate.cs @@ -10,7 +10,7 @@ public class UValidate { public static void Check(object a, object b, object name) { - if (a?.ToString()?.Trim() != b?.ToString()?.Trim()) + if (a?.ToString()?.Replace(" ","").Trim().ToLower() != b?.ToString().Replace(" ", "")?.Trim().ToLower()) { throw new Exception(name + " error"); }