This commit is contained in:
@@ -86,11 +86,11 @@ public class NextId
|
||||
var time = TestEpoch.AddMilliseconds(200);
|
||||
|
||||
// Act & Assert
|
||||
for (int i = 0; i < 255; i++)
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
_seqId.Next(time); // Exhauste sequence
|
||||
_seqId.Next(time); // Use all 256 sequence values (0-255)
|
||||
}
|
||||
Action act = () => _seqId.Next(time);
|
||||
Action act = () => _seqId.Next(time); // 257th call should throw
|
||||
act.ShouldThrow<IndexOutOfRangeException>()
|
||||
.WithMessage("Refused to create new SeqId. Sequence exhausted.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user