mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add unit test
This commit is contained in:
parent
71ef2a95e7
commit
45bc377952
@ -98,6 +98,7 @@
|
||||
<Compile Include="UnitTest\UCustom01.cs" />
|
||||
<Compile Include="UnitTest\UCustom02.cs" />
|
||||
<Compile Include="UnitTest\UCustom03.cs" />
|
||||
<Compile Include="UnitTest\UCustom05.cs" />
|
||||
<Compile Include="UnitTest\UCustom04.cs" />
|
||||
<Compile Include="UnitTest\UDelete.cs" />
|
||||
<Compile Include="UnitTest\UFastest.cs" />
|
||||
|
@ -35,6 +35,7 @@ namespace OrmTest
|
||||
UCustom02.Init();
|
||||
UCustom03.Init();
|
||||
UCustom04.Init();
|
||||
UCustom05.Init();
|
||||
SubQueryTest();
|
||||
UConfig();
|
||||
DeleteTest();
|
||||
|
22
Src/Asp.Net/SqlServerTest/UnitTest/UCustom05.cs
Normal file
22
Src/Asp.Net/SqlServerTest/UnitTest/UCustom05.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
public class UCustom05
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
var db = NewUnitTest.Db;
|
||||
var id=db.Insertable(new Order() { CreateTime = DateTime.Now, Name = "a", Price = 111, CustomId = 1 }).ExecuteReturnIdentity();
|
||||
var data = db.GetSimpleClient<Order>().GetById(id);
|
||||
var x=db.Storageable(data).WhereColumns(it=>it.Price).ToStorage();
|
||||
Check.Exception(x.UpdateList.Count == 0, "unit error");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user