已完成“考试安排与考场管理”模块:
考试计划草稿、场次配置与正式发布。 教学班、考试时间、考场、监考教师关联。 自动校验考场容量。 阻止考场、监考教师和学生考试时间冲突。 管理员查看考生名单。 教师查看个人监考安排。 学生查看已发布考试日程。 SQLite 增量升级和 MySQL 正式迁移。
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using Jiaowu.Api.Infrastructure.Exams;
|
||||
|
||||
namespace Jiaowu.Api.Tests;
|
||||
|
||||
public sealed class ExamConflictRulesTests
|
||||
{
|
||||
[Fact]
|
||||
public void Overlapping_exam_times_conflict() =>
|
||||
Assert.True(ExamConflictRules.TimeOverlaps(
|
||||
new DateTime(2027, 1, 8, 9, 0, 0),
|
||||
new DateTime(2027, 1, 8, 11, 0, 0),
|
||||
new DateTime(2027, 1, 8, 10, 30, 0),
|
||||
new DateTime(2027, 1, 8, 12, 0, 0)));
|
||||
|
||||
[Fact]
|
||||
public void Adjacent_exam_times_do_not_conflict() =>
|
||||
Assert.False(ExamConflictRules.TimeOverlaps(
|
||||
new DateTime(2027, 1, 8, 9, 0, 0),
|
||||
new DateTime(2027, 1, 8, 11, 0, 0),
|
||||
new DateTime(2027, 1, 8, 11, 0, 0),
|
||||
new DateTime(2027, 1, 8, 13, 0, 0)));
|
||||
}
|
||||
Reference in New Issue
Block a user