学籍异动:休学、复学、退学申请及辅导员→学院→教务处分级审批。
毕业审核:批次计算、缺失课程检查、人工复核、结果发布。 学位授予:毕业资格与 GPA 计算、人工调整、发布授予结果。 毕业离校:离校事项配置、责任角色分工、逐项办理及批次关闭。
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Jiaowu.Api.Domain.Academic;
|
||||
using Jiaowu.Api.Infrastructure.Graduation;
|
||||
|
||||
namespace Jiaowu.Api.Tests;
|
||||
|
||||
public sealed class DegreeAwardRulesTests
|
||||
{
|
||||
[Fact]
|
||||
public void Graduated_student_meeting_gpa_requirement_is_granted()
|
||||
{
|
||||
var conclusion = DegreeAwardRules.Evaluate(
|
||||
true, StudentStatus.Graduated, 3.12m, 2.0m);
|
||||
|
||||
Assert.Equal(DegreeAwardConclusion.Granted, conclusion);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(false, StudentStatus.Graduated, 3.12, 2.0)]
|
||||
[InlineData(true, StudentStatus.Active, 3.12, 2.0)]
|
||||
[InlineData(true, StudentStatus.Graduated, 1.99, 2.0)]
|
||||
public void Missing_prerequisite_prevents_degree_award(
|
||||
bool graduationEligible,
|
||||
StudentStatus status,
|
||||
decimal averageGradePoint,
|
||||
decimal minimumGradePoint)
|
||||
{
|
||||
var conclusion = DegreeAwardRules.Evaluate(
|
||||
graduationEligible, status, averageGradePoint, minimumGradePoint);
|
||||
|
||||
Assert.Equal(DegreeAwardConclusion.NotGranted, conclusion);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using Jiaowu.Api.Domain.Academic;
|
||||
using Jiaowu.Api.Infrastructure.Graduation;
|
||||
|
||||
namespace Jiaowu.Api.Tests;
|
||||
|
||||
public sealed class GraduationAuditRulesTests
|
||||
{
|
||||
[Fact]
|
||||
public void Active_student_with_full_credits_and_courses_is_eligible()
|
||||
{
|
||||
var conclusion = GraduationAuditRules.Evaluate(
|
||||
true, StudentStatus.Active, 160, 162, 42, 42, 0);
|
||||
|
||||
Assert.Equal(GraduationAuditConclusion.Eligible, conclusion);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(false, StudentStatus.Active, 160, 162, 42, 42, 0)]
|
||||
[InlineData(true, StudentStatus.Suspended, 160, 162, 42, 42, 0)]
|
||||
[InlineData(true, StudentStatus.Active, 160, 159, 42, 42, 0)]
|
||||
[InlineData(true, StudentStatus.Active, 160, 162, 42, 41, 0)]
|
||||
[InlineData(true, StudentStatus.Active, 160, 162, 42, 42, 1)]
|
||||
public void Any_unresolved_requirement_makes_student_ineligible(
|
||||
bool hasPlan,
|
||||
StudentStatus status,
|
||||
decimal requiredCredits,
|
||||
decimal earnedCredits,
|
||||
int requiredCourses,
|
||||
int passedRequiredCourses,
|
||||
int failedCourses)
|
||||
{
|
||||
var conclusion = GraduationAuditRules.Evaluate(
|
||||
hasPlan, status, requiredCredits, earnedCredits,
|
||||
requiredCourses, passedRequiredCourses, failedCourses);
|
||||
|
||||
Assert.Equal(GraduationAuditConclusion.Ineligible, conclusion);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using Jiaowu.Api.Domain.Academic;
|
||||
using Jiaowu.Api.Infrastructure.Graduation;
|
||||
|
||||
namespace Jiaowu.Api.Tests;
|
||||
|
||||
public sealed class GraduationClearanceRulesTests
|
||||
{
|
||||
[Fact]
|
||||
public void Required_items_may_be_completed_or_waived()
|
||||
{
|
||||
var records = new[]
|
||||
{
|
||||
(true, GraduationClearanceRecordStatus.Completed),
|
||||
(true, GraduationClearanceRecordStatus.Waived),
|
||||
(false, GraduationClearanceRecordStatus.Pending)
|
||||
};
|
||||
|
||||
Assert.True(GraduationClearanceRules.CanClose(records));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Pending_required_item_prevents_batch_close()
|
||||
{
|
||||
var records = new[]
|
||||
{
|
||||
(true, GraduationClearanceRecordStatus.Completed),
|
||||
(true, GraduationClearanceRecordStatus.Pending)
|
||||
};
|
||||
|
||||
Assert.False(GraduationClearanceRules.CanClose(records));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Empty_batch_cannot_be_closed()
|
||||
{
|
||||
Assert.False(GraduationClearanceRules.CanClose([]));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user