From 04584bb2518287bdaab3a1d1c97fd5f7c73583ff Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 17 Jul 2023 19:54:01 +0800 Subject: [PATCH] Update unit test --- .../SqlSeverTest/UnitTest/Updateable.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSeverTest/UnitTest/Updateable.cs b/Src/Asp.NetCore2/SqlSeverTest/UnitTest/Updateable.cs index 2c530387a..ba8fbb27d 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/UnitTest/Updateable.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/UnitTest/Updateable.cs @@ -43,39 +43,39 @@ namespace OrmTest { IsRemind = saveDiary.IsRemind, }).Where(it => it.ID == saveDiary.ID).ToSql(); - UValidate.Check(sql.Key, @"UPDATE [Diary] SET - [IsRemind] = @Const0 WHERE ( [ID] = @ID1 )", "Updateable"); + UValidate.Check(sql.Key.Replace(" ",""), @"UPDATE [Diary] SET + [IsRemind] = @Const0 WHERE ( [ID] = @ID1 )".Replace(" ", ""), "Updateable"); sql = Db.Updateable().SetColumns(it => new UnitDiary() { TypeID = saveDiary.TypeID, }).Where(it => it.ID == saveDiary.ID).ToSql(); - UValidate.Check(sql.Key, @"UPDATE [Diary] SET - [TypeID] = @Const0 WHERE ( [ID] = @ID1 )", "Updateable"); + UValidate.Check(sql.Key.Replace(" ", ""), @"UPDATE [Diary] SET + [TypeID] = @Const0 WHERE ( [ID] = @ID1 )".Replace(" ", ""), "Updateable"); sql = Db.Updateable().SetColumns(it => new UnitDiary() { TypeID = saveDiary.TypeID, }).Where(it => it.ID == saveDiary.ID).ToSql(); - UValidate.Check(sql.Key, @"UPDATE [Diary] SET - [TypeID] = @Const0 WHERE ( [ID] = @ID1 )", "Updateable"); + UValidate.Check(sql.Key.Replace(" ", ""), @"UPDATE [Diary] SET + [TypeID] = @Const0 WHERE ( [ID] = @ID1 )".Replace(" ", ""), "Updateable"); sql = Db.Updateable().SetColumns(it => new NullTest() { p = true }).Where(it => it.id == 1).ToSql(); - UValidate.Check(sql.Key, @"UPDATE [NullTest] SET - [p] = @Const0 WHERE ( [id] = @id1 )", "Updateable"); + UValidate.Check(sql.Key.Replace(" ", ""), @"UPDATE [NullTest] SET + [p] = @Const0 WHERE ( [id] = @id1 )".Replace(" ", ""), "Updateable"); sql = Db.Updateable().SetColumns(it => new NullTest() { p2 = true }).Where(it => it.id == 1).ToSql(); - UValidate.Check(sql.Key, @"UPDATE [NullTest] SET - [p2] = @Const0 WHERE ( [id] = @id1 )", "Updateable"); + UValidate.Check(sql.Key.Replace(" ", ""), @"UPDATE [NullTest] SET + [p2] = @Const0 WHERE ( [id] = @id1 )".Replace(" ", ""), "Updateable"); Db.Updateable()