Move simulation history into profile

This commit is contained in:
hz
2026-07-14 21:38:03 -05:00
parent 52e82391ee
commit 3b946c2bc5
14 changed files with 312 additions and 68 deletions
@@ -71,6 +71,28 @@ public sealed class ExamSimulationTests
Assert.Equal(expected, ExamSimulationStore.BlueprintCategory(new Question { System = system }));
}
[Fact]
public void HistorySummarySupportsScoredAndUnscoredStates()
{
var active = ExamSimulationStore.ToHistorySummary(new ExamSimulation
{
State = ExamSimulationStates.BlockActive,
CurrentBlock = 3,
Items = BuildItems(20)
});
var completed = ExamSimulationStore.ToHistorySummary(new ExamSimulation
{
State = ExamSimulationStates.Completed,
Items = BuildItems(20),
Score = new ExamSimulationScore { PredictedScore = 221, RangeLow = 204, RangeHigh = 238, Correct = 15, Total = 20 }
});
Assert.Null(active.PredictedScore);
Assert.Equal(3, active.CurrentBlock);
Assert.Equal(221, completed.PredictedScore);
Assert.Equal(15, completed.Correct);
}
private static List<ExamSimulationItem> BuildItems(int count, bool wasSeen = false) =>
Enumerable.Range(0, count).Select(index => new ExamSimulationItem
{