public void CanGenerateTheCorrectRowIndexSequenceForIndex3() { var rowIndexSequence = default(RowIndexSequence); var results = default(List<int>); "Given that I have a row index sequence".Context(() => rowIndexSequence = new RowIndexSequence()); "When I create a a sequence for row index 3 for board size 9".Do(() => results = rowIndexSequence.Get(3, 9).ToList()); "Then the sequence should contain 7 elements".Observation(() => results.Count().ShouldEqual(7)); "Then the 1st element in the sequence should be 1".Observation(() => results[0].ShouldEqual(1)); "Then the 2nd element in the sequence should be 2".Observation(() => results[1].ShouldEqual(2)); "Then the 3rd element in the sequence should be 3".Observation(() => results[2].ShouldEqual(3)); "Then the 4th element in the sequence should be 4".Observation(() => results[3].ShouldEqual(4)); "Then the 5th element in the sequence should be 5".Observation(() => results[4].ShouldEqual(5)); "Then the 6th element in the sequence should be 6".Observation(() => results[5].ShouldEqual(6)); "Then the 7th element in the sequence should be 7".Observation(() => results[6].ShouldEqual(7)); }
public void CanGenerateTheCorrectRowIndexSequenceForIndex0() { var rowIndexSequence = default(RowIndexSequence); var results = default(List<int>); "Given that I have a row index sequence".Context(() => rowIndexSequence = new RowIndexSequence()); "When I create a a sequence for row index 0 for board size 9".Do(() => results = rowIndexSequence.Get(0, 9).ToList()); "Then the sequence should contain 1 element".Observation(() => results.Count().ShouldEqual(1)); "Then the 1st element in the sequence should be 4".Observation(() => results[0].ShouldEqual(4)); }