예제 #1
0
        public void CheckAccessCellNegativeTest(int number, char[,] gameField)
        {
            // Arange
            var memory     = new MemoryRepository();
            var display    = new ConsoleDisplay();
            var controller = new ConsoleController();
            var game       = new TicTacToeApp.BLL.TicTacToe(memory, display, controller);

            game.InitMemory(gameField: gameField);
            var cellPosition = game.FindCellPositionByNumber(number);

            // Act
            var result = game.CheckAccessCellByPosition(cellPosition);

            // Assert
            result.Should().BeFalse();
        }
예제 #2
0
        public void FindMatchesNegativeTest(char userSymbol, char[,] gameField)
        {
            // Arange
            var memory     = new MemoryRepository();
            var display    = new ConsoleDisplay();
            var controller = new ConsoleController();
            var game       = new TicTacToeApp.BLL.TicTacToe(memory, display, controller);

            game.InitMemory(gameField: gameField);
            game.SetUserSymbol(userSymbol);
            game.SetGameField(gameField);

            // Act
            var result = game.FindMatches();

            // Assert
            result.Should().BeFalse();
        }