Redesign exam and CCS experiences
This commit is contained in:
@@ -85,16 +85,32 @@ public sealed class ExamSimulationTests
|
||||
State = ExamSimulationStates.Completed,
|
||||
IsSample = true,
|
||||
Items = BuildItems(20),
|
||||
Score = new ExamSimulationScore { PredictedScore = 221, RangeLow = 204, RangeHigh = 238, Correct = 15, Total = 20 }
|
||||
Score = new ExamSimulationScore { PredictedScore = 221, RangeLow = 204, RangeHigh = 238, PassProbability = 0.73, Correct = 15, Total = 20 }
|
||||
});
|
||||
|
||||
Assert.Null(active.PredictedScore);
|
||||
Assert.Equal(3, active.CurrentBlock);
|
||||
Assert.Equal(221, completed.PredictedScore);
|
||||
Assert.Equal(15, completed.Correct);
|
||||
Assert.Equal(0.73, completed.PassProbability);
|
||||
Assert.True(completed.IsSample);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void HistoryCursorRoundTripsTimestampAndObjectId()
|
||||
{
|
||||
var timestamp = new DateTime(2026, 7, 16, 22, 15, 30, DateTimeKind.Utc);
|
||||
const string id = "64b1d9f36f7a4e2b8c901234";
|
||||
|
||||
var encoded = ExamSimulationStore.EncodeHistoryCursor(timestamp, id);
|
||||
|
||||
Assert.True(ExamSimulationStore.TryDecodeHistoryCursor(encoded, out var decoded));
|
||||
Assert.NotNull(decoded);
|
||||
Assert.Equal(timestamp, decoded.CreatedUtc);
|
||||
Assert.Equal(id, decoded.Id);
|
||||
Assert.False(ExamSimulationStore.TryDecodeHistoryCursor("not-a-cursor", out _));
|
||||
}
|
||||
|
||||
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