Ejemplo n.º 1
0
        public void Verify_InvalidDataForMoveWithNoOtherPieces_ReturnsFalse(int finalDestinationColumn, int finalDestinationRow)
        {
            IChessPiece knight = new Knight(0, 5, 5);

            IChessMoveVerifier knightMoveVerifier = new KnightMoveVerifier();

            var result = knightMoveVerifier.Verify(knight, finalDestinationColumn, finalDestinationRow);

            Assert.False(result);
        }
Ejemplo n.º 2
0
        public void Verify_KnightAttacksSameColor_ReturnsFalse()
        {
            IChessPiece        knight      = new Knight(0, 5, 5);
            List <IChessPiece> otherPieces = new List <IChessPiece>();

            otherPieces.Add(new Knight(0, 6, 7));

            IChessMoveVerifier knightMoveVerifier = new KnightMoveVerifier();

            var result = knightMoveVerifier.Verify(knight, 6, 7, otherPieces);

            Assert.False(result);
        }