예제 #1
0
        public void IsFinishedEqualsTrueWhenThirdMoveIsMade(string gameBoardData, string moves, int boardDimension, bool expectedResultForIsFinished)
        {
            var gameBoardFactory = new GameBoardFactory();
            IList<Field> gameBoard = gameBoardFactory.Create(gameBoardData, boardDimension);

            Moves moveHelper = new Moves(gameBoard);
            moveHelper.PerformMoves(moves);

            moveHelper.IsActualMoveFinished.Should().Be(expectedResultForIsFinished);
        }
예제 #2
0
        public void Winkelzug(string name, string gameBoardData, string moves, string expectedResult, int boardDimension)
        {
            var gameBoardFactory = new GameBoardFactory();
            IList<Field> gameBoard = gameBoardFactory.Create(gameBoardData, boardDimension);

            Moves moveHelper = new Moves(gameBoard);
            moveHelper.PerformMoves(moves);

            gameBoardFactory.VerifyFields(gameBoard, expectedResult);
        }
예제 #3
0
        public void IsAsExpectedWhenWinkelzugIsMade(string gameBoardData, string moves, int boardDimension, bool expectedResultForIsValidMove)
        {
            var gameBoardFactory = new GameBoardFactory();
            IList<Field> gameBoard = gameBoardFactory.Create(gameBoardData, boardDimension);

            Moves moveHelper = new Moves(gameBoard);
            moveHelper.PerformMoves(moves);

            moveHelper.IsActualMoveValid.Should().Be(expectedResultForIsValidMove);
        }