Update unit test

This commit is contained in:
sunkaixuan
2022-07-08 10:25:34 +08:00
parent 512e3ef5b4
commit b26928407c
2 changed files with 15 additions and 0 deletions

View File

@@ -125,6 +125,16 @@ namespace OrmTest
{
throw new Exception("unit error");
}
var id = db.Queryable<School_002>().ToList().Last().scid;
db.DeleteNav<School_002>(s => s.scid == id)
.Include(it => it.rooms)
.ThenInclude(it=>it.desk).ExecuteCommand();
if (db.Queryable<Desk_002>().Count() != 2 || db.Queryable<Room_002>().Count() !=2
|| db.Queryable<School_002>().Count() != 1|| db.Queryable<Student_002>().Count() != 0)
{
throw new Exception("unit error");
}
}
public class Student_002

View File

@@ -68,6 +68,11 @@ namespace OrmTest
.Include(x=>x.books)
.Include(x=>x.school_001)
.ExecuteCommand();
var id = db.Queryable<Student_004>().ToList().Last().sid;
db.DeleteNav<Student_004>(s => s.sid == id)
.Include(it => it.books)
.Include(it=>it.school_001).ExecuteCommand();
}