コード例 #1
0
        public void Setup()
        {
            //A G
            game = new TicTacToeClass();

            //A W

            game.newGame();
        }
コード例 #2
0
        public void savingTheBoard()
        {
            var gateway = Substitute.For <IDBgateway>();

            TicTacToeClass newgame = new TicTacToeClass(gateway);

            newgame.newGame();

            //newgame.nextMove('X', 0);

            newgame.SaveTheBoard();

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

            gateway.Received().save(expectedBoard);

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