コード例 #1
0
        public void Error_if_position_is_played()
        {
            var ticTacToe = new TicTacToeBoard();

            ticTacToe.Change(2, "X");
            Assert.Throws <ArgumentException>(() => ticTacToe.Change(2, "O"));
        }
コード例 #2
0
        public void Place_symbols_in_correct_locations(int position, string player)
        {
            var ticTacToe = new TicTacToeBoard();
            var board     = ticTacToe.Change(position, player);

            Assert.That(board[position - 1], Is.EqualTo(player));
        }