Ejemplo n.º 1
0
        public void Single_Piece_On_Board_Has_Correct_Possible_Moves(Type pieceType, string startingSquare, string expectedPossibleMoves)
        {
            var    board = new Board();
            IPiece piece = (IPiece)Activator.CreateInstance(pieceType);

            piece.AddToBoard(board, startingSquare);
            var actualPossibleMoves = board.GetPossibleMoves(startingSquare);

            var comparer = new CompareLogic(new ComparisonConfig()
            {
                IgnoreCollectionOrder = true
            });
            var result = comparer.Compare(expectedPossibleMoves.Split(','), actualPossibleMoves.ToArray());

            Assert.That(result.AreEqual, Is.True, result.DifferencesString);
        }