mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-22 02:51:58 +08:00
Update unit test
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user