Ejemplo n.º 1
0
        public void NeitherPlayerHasthreeInARow()
        {
            IGameWinnerService gameWinnerService;

            gameWinnerService = new GameWinnerService();
            const char expected  = ' ';
            var        gameBoard = new char[3, 3] {
                { ' ', ' ', ' ' }, { ' ', ' ', ' ' }, { ' ', ' ', ' ' }
            };

            var actual = gameWinnerService.Validate(gameBoard);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void PlayerWithAllSpaceInTopRowIsWinner()
        {
            IGameWinnerService gameWinnerService;

            gameWinnerService = new GameWinnerService();
            const char expected  = 'X';
            var        gameBoard = new char[3, 3]
            {
                { expected, expected, expected },
                { ' ', ' ', ' ' },
                { ' ', ' ', ' ' }
            };
            var actual = gameWinnerService.Validate(gameBoard);

            Assert.AreEqual(expected.ToString(), actual.ToString());
        }