Add unit test

This commit is contained in:
sunkaixuan 2022-07-03 03:24:51 +08:00
parent 67776cec39
commit f3d08a7563
2 changed files with 10 additions and 0 deletions

View File

@ -139,6 +139,7 @@
<Compile Include="UnitTest\UDelete.cs" />
<Compile Include="UnitTest\UFastest.cs" />
<Compile Include="UnitTest\UConfig.cs" />
<Compile Include="UnitTest\UOneManyMany 2.cs" />
<Compile Include="UnitTest\UOneManyMany.cs" />
<Compile Include="UnitTest\USplit.cs" />
<Compile Include="UnitTest\Models\TB_AdminUser.cs" />

View File

@ -107,6 +107,15 @@ namespace OrmTest
{
throw new Exception("unit error");
}
db.DbMaintenance.TruncateTable<Student_002, School_002, Room_002, Desk_002>();
db.InsertNav(list.First().school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
db.InsertNav(list.Last().school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
}
public class Student_002