Move simulation history into profile
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user