示例#1
0
        public void TileError()
        {
            var   validSudoku = TestsHelpers.GetBoardContent("Boards\\BoardTileError.txt");
            Board board       = new Board(validSudoku);

            Assert.IsFalse(board.IsValid());
        }
示例#2
0
        public void ValidBoard()
        {
            var   validSudoku = TestsHelpers.GetBoardContent("Boards\\BoardValid.txt");
            Board board       = new Board(validSudoku);

            Assert.IsTrue(board.IsValid());
        }
示例#3
0
        public void GenerateOneFilled()
        {
            var board = new Board(TestsHelpers.GetBoardContent("Boards\\BoardValid.txt"));

            board = board.Generate(1);
            Assert.IsTrue(board.IsValid());
        }
示例#4
0
        public void ConstructorStringArray()
        {
            var   validSudoku = TestsHelpers.GetBoardContent("Boards\\BoardValid.txt");
            Board board       = new Board(validSudoku);

            foreach (var value in board.AsStrings())
            {
                Console.WriteLine(value);
            }
            Assert.AreEqual(validSudoku, board.AsStrings());
        }