@@ -9,7 +9,6 @@ namespace NTestDataBuilder.Tests.DataSources.Generators
99 public class SequentiaGeneratorTests
1010 {
1111 [ Theory ,
12- InlineData ( 0 , 0 ) ,
1312 InlineData ( 5 , 4 ) ,
1413 InlineData ( 5 , 5 ) ]
1514 public void WhenCreatingRandomGenerator_ThenStartIndexMustBeLessThanListSize ( int startIndex , int listSize )
@@ -42,7 +41,7 @@ public void WhenCreatingRandomGenerator_ThenListSizeMustBeGreaterThanZero(int st
4241 public void WhenGeneratingIntegers_ThenShouldBeSequential ( )
4342 {
4443 var sut = new SequentialGenerator ( 0 , 11 ) ;
45- for ( int index = sut . StartIndex ; index <= sut . ListSize ; index ++ )
44+ for ( int index = sut . StartIndex ; index < sut . ListSize ; index ++ )
4645 {
4746 sut . Generate ( ) . ShouldBe ( index ) ;
4847 }
@@ -52,7 +51,7 @@ public void WhenGeneratingIntegers_ThenShouldBeSequential()
5251 public void GivenGeneratorIsNotUnique_WhenGeneratingIntegers_ThenShouldResetAtEndOfList ( )
5352 {
5453 var sut = new SequentialGenerator ( 0 , 2 ) ;
55- for ( int index = sut . StartIndex ; index <= sut . ListSize ; index ++ )
54+ for ( int index = sut . StartIndex ; index < sut . ListSize ; index ++ )
5655 {
5756 sut . Generate ( ) . ShouldBe ( index ) ;
5857 }
@@ -64,7 +63,7 @@ public void GivenGeneratorIsNotUnique_WhenGeneratingIntegers_ThenShouldResetAtEn
6463 public void GivenGeneratorIsUnique_WhenGeneratingIntegers_ThenShouldResetAtEndOfList ( )
6564 {
6665 var sut = new SequentialGenerator ( 0 , 2 , true ) ;
67- for ( int index = sut . StartIndex ; index <= sut . ListSize ; index ++ )
66+ for ( int index = sut . StartIndex ; index < sut . ListSize ; index ++ )
6867 {
6968 sut . Generate ( ) . ShouldBe ( index ) ;
7069 }
0 commit comments