Update unit test

This commit is contained in:
sunkaixuan 2022-07-03 16:55:07 +08:00
parent 69cd3815f2
commit 20f9d33680
4 changed files with 16 additions and 16 deletions

View File

@ -80,11 +80,11 @@ namespace OrmTest
db.InsertNav(list.First())
.ThenInclude(x => x.school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
db.InsertNav(list.Last())
.ThenInclude(x => x.school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
if (db.Queryable<Desk_001>().Count() != 4 || db.Queryable<Room_001>().Count() != 4
|| db.Queryable<School_001>().Count() != 2 || db.Queryable<Student_001>().Count() != 2)

View File

@ -96,11 +96,11 @@ namespace OrmTest
db.InsertNav(list.First())
.ThenInclude(x => x.school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
db.InsertNav(list.Last())
.ThenInclude(x => x.school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
if (db.Queryable<Desk_002>().Count() != 4 || db.Queryable<Room_002>().Count() != 4
|| db.Queryable<School_002>().Count() != 2 || db.Queryable<Student_002>().Count() != 2)
@ -112,10 +112,10 @@ namespace OrmTest
db.InsertNav(list.First().school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
db.InsertNav(list.Last().school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
if (db.Queryable<Desk_002>().Count() != 4 || db.Queryable<Room_002>().Count() != 4
|| db.Queryable<School_002>().Count() != 2 || db.Queryable<Student_002>().Count() != 0)

View File

@ -96,11 +96,11 @@ namespace OrmTest
db.InsertNav(list.First())
.ThenInclude(x => x.school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
db.InsertNav(list.Last())
.ThenInclude(x => x.school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
if (db.Queryable<Desk_003>().Count() != 4 || db.Queryable<Room_003>().Count() != 4
|| db.Queryable<School_003>().Count() != 2 || db.Queryable<Student_003>().Count() != 2)
@ -112,10 +112,10 @@ namespace OrmTest
db.InsertNav(list.First().school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
db.InsertNav(list.Last().school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
if (db.Queryable<Desk_003>().Count() != 4 || db.Queryable<Room_003>().Count() != 4
|| db.Queryable<School_003>().Count() != 2 || db.Queryable<Student_003>().Count() != 0)

View File

@ -1,4 +1,5 @@
using System;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -100,11 +101,11 @@ namespace OrmTest
db.InsertNav(list.First())
.ThenInclude(x => x.school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
db.InsertNav(list.Last())
.ThenInclude(x => x.school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
if (db.Queryable<Desk_004>().Count() != 4 || db.Queryable<Room_004>().Count() != 4
|| db.Queryable<School_004>().Count() != 2 || db.Queryable<Student_004>().Count() != 2)
@ -116,11 +117,10 @@ namespace OrmTest
db.InsertNav(list.First().school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
db.InsertNav(list.Last().school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk);
.ThenInclude(x => x.desk).ExecuteCommand();
if (db.Queryable<Desk_004>().Count() != 4 || db.Queryable<Room_004>().Count() != 4
|| db.Queryable<School_004>().Count() != 2 || db.Queryable<Student_004>().Count() != 0)
{