修改演示数据插入脚本

This commit is contained in:
biss committed 2026-08-15 10:23:09 +08:00
1 parent 51b83e9d78
commit be49a2586f
2 files changed
+17 -7

No files matched your search

@@ -31,7 +31,15 @@ public sealed class DemoDataSeederTests
Assert.Equal(128, await db.Teachers.CountAsync());
Assert.Equal(3640, await db.Students.CountAsync());
Assert.Equal(148, await db.Courses.CountAsync());
Assert.Equal(736, await db.TeacherCourseApplications.CountAsync());
Assert.Equal(624, await db.TeacherCourseApplications.CountAsync());
var crossCollegeApplications = await (
from application in db.TeacherCourseApplications
join teacher in db.Teachers on application.TeacherId equals teacher.Id
join course in db.Courses on application.CourseId equals course.Id
where teacher.CollegeId != course.CollegeId
select application.Id)
.CountAsync();
Assert.Equal(0, crossCollegeApplications);
Assert.Equal(1, await db.AcademicTerms.CountAsync(x => x.IsCurrent));
Assert.Equal(30, await db.Classrooms.CountAsync());
}