优化考试排考

This commit is contained in:
2026-07-27 19:31:19 +08:00 Unverified
parent 64decdab7e
commit c3e8a42641
14 changed files with 7013 additions and 272 deletions
@@ -21,6 +21,14 @@ public sealed class AutomaticScheduleGeneratorTests
await db.Database.EnsureCreatedAsync();
await db.Database.ExecuteSqlRawAsync(
"DROP TABLE \"BackgroundJobOutboxMessages\"");
await db.Database.ExecuteSqlRawAsync(
"DROP TABLE \"ExamRoomInvigilators\"");
await db.Database.ExecuteSqlRawAsync(
"DROP TABLE \"ExamSeats\"");
await db.Database.ExecuteSqlRawAsync(
"DROP TABLE \"ExamRoomSessions\"");
await db.Database.ExecuteSqlRawAsync(
"DROP TABLE \"ExamRooms\"");
var migrator = new DevelopmentSqliteMigrator(
db,
@@ -30,6 +38,10 @@ public sealed class AutomaticScheduleGeneratorTests
Assert.True(await db.ScheduleTimeSlots.CountAsync() == 0);
Assert.True(await db.AutomaticScheduleJobs.CountAsync() == 0);
Assert.True(await db.BackgroundJobOutboxMessages.CountAsync() == 0);
Assert.True(await db.ExamRooms.CountAsync() == 0);
Assert.True(await db.ExamRoomSessions.CountAsync() == 0);
Assert.True(await db.ExamSeats.CountAsync() == 0);
Assert.True(await db.ExamRoomInvigilators.CountAsync() == 0);
Assert.True(await db.Database
.SqlQueryRaw<int>(
"""