Beispiel #1
0
        public void firstMoveIncreaseMoveCounter()
        {
            game.nextMove('X', 0);


            //A T

            Assert.AreEqual(1, game.moveCount());
        }
Beispiel #2
0
        public void loadingTheBoard()
        {
            var gateway = Substitute.For <IDBgateway>();

            TicTacToeClass newgame = new TicTacToeClass(gateway);

            newgame.nextMove('X', 0);

            newgame.SaveTheBoard();

            newgame.nextMove('O', 1);

            char[] expectedBoard = new char[9] {
                'X', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'
            };

            gateway.load().Returns(expectedBoard);

            newgame.LoadTheBoard();

            Assert.AreEqual(expectedBoard, newgame.getTheBoard());
        }