Ejemplo n.º 1
0
 public void _31_black_pawn_capture_white_pawn()
 {
     _chessBoard.Add(_pawn, 3, 6);
     _chessBoard.Add(_opponent, 4, 1);
     Assert.That(_chessBoard.PiecesOnBoard(), Is.EqualTo(2));
     _pawn.Move(3, 5);
     _pawn.Move(3, 4);
     Assert.That(_pawn.XCoordinate, Is.EqualTo(3));
     Assert.That(_pawn.YCoordinate, Is.EqualTo(4));
     _opponent.Move(4, 3);
     Assert.That(_opponent.XCoordinate, Is.EqualTo(4));
     Assert.That(_opponent.YCoordinate, Is.EqualTo(3));
     ((Pawn)_pawn).Capture(4, 3);
     Assert.That(_pawn.XCoordinate, Is.EqualTo(4));
     Assert.That(_pawn.YCoordinate, Is.EqualTo(3));
     Assert.That(_chessBoard.PiecesOnBoard(), Is.EqualTo(1));
 }