public void Next_Using_All_Values_Loops_Values_To_Beginning() { var random = new FakeRandom(Values); foreach (var value in Values) { var nextRandomValue = random.Next(); nextRandomValue.Should().Be((int)value); } // ensure that values are used again, in the same order. foreach (var value in Values) { var nextRandomValue = random.Next(); nextRandomValue.Should().Be((int)value); } }
public void Next_With_Range_Generates_Random_Numbers_In_Expected_Order() { var random = new FakeRandom(Values); foreach (var value in Values) { var nextRandomValue = random.Next(10, 100); nextRandomValue.Should().Be((int)value); } }