Пример #1
0
 public void Next_IteratesThroughFirstColumn_IteratesThroughPuzzle(int grid, int[] gridValues)
 {
     _iterator = new SubGridIterator(_puzzle, grid);
     foreach (int value in gridValues)
     {
         Assert.AreEqual(value, _iterator.GetCurrent().Value);
         if (!_iterator.IsDone())
         {
             _iterator.Next();
         }
     }
 }
Пример #2
0
        public void First_WhenCalled_MovesToFirstCell()
        {
            _iterator.Next();
            _iterator.Next();
            _iterator.First();

            Assert.AreEqual(1, _iterator.GetCurrent().Value);
        }