예제 #1
0
        public void AllCellsHaveTheirExpectedRow()
        {
            string input       = "000820090500000000308040007100000040006402503000090010093004000004035200000700900";
            Parser parser      = new Parser(input);
            Cell   currentCell = parser.StartCell;

            int[] expectedRowNumbers = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8 };

            for (int i = 0; i < 81; i++)
            {
                if (expectedRowNumbers[i] != currentCell.GetAssociatedRow().GetRowNumber())
                {
                    Console.WriteLine(expectedRowNumbers[i] + " is verwacht op positie " + i + " maar werkelijke row is: " + currentCell.GetAssociatedRow().GetRowNumber());
                }
                Assert.AreEqual(expectedRowNumbers[i], currentCell.GetAssociatedRow().GetRowNumber());
                currentCell = currentCell.GetNextCell();
            }
        }
예제 #2
0
        public void AllCellsHaveARow()
        {
            string input       = "000820090500000000308040007100000040006402503000090010093004000004035200000700900";
            Parser parser      = new Parser(input);
            Cell   currentCell = parser.StartCell;

            for (int i = 0; i < 81; i++)
            {
                Assert.IsNotNull(currentCell.GetAssociatedRow());
                currentCell = currentCell.GetNextCell();
            }
        }