ChessDotNet.Tests.ChessGameTests.TestApplyMoveWhitePawn_EnPassant C# (CSharp) Method

TestApplyMoveWhitePawn_EnPassant() private method

private TestApplyMoveWhitePawn_EnPassant ( ) : void
return void
        public static void TestApplyMoveWhitePawn_EnPassant()
        {
            ChessGame cb = new ChessGame();
            Move move1 = new Move(new Position(File.E, 2), new Position(File.E, 4), Player.White);
            Move move2 = new Move(new Position(File.E, 7), new Position(File.E, 6), Player.Black);
            Move move3 = new Move(new Position(File.E, 4), new Position(File.E, 5), Player.White);
            Move move4 = new Move(new Position(File.D, 7), new Position(File.D, 5), Player.Black);
            Move move5 = new Move(new Position(File.E, 5), new Position(File.D, 6), Player.White);

            cb.ApplyMove(move1, true);
            cb.ApplyMove(move2, true);
            cb.ApplyMove(move3, true);
            cb.ApplyMove(move4, true);
            cb.ApplyMove(move5, true);

            Piece[][] board = new Piece[8][]
            {
                new[] { rb, nb, bb, qb, kb, bb, nb, rb },
                new[] { pb, pb, pb, o, o, pb, pb, pb },
                new[] { o, o, o, pw, pb, o, o, o },
                new[] { o, o, o, o, o, o, o, o },
                new[] { o, o, o, o, o, o, o, o },
                new[] { o, o, o, o, o, o, o, o },
                new[] { pw, pw, pw, pw, o, pw, pw, pw },
                new[] { rw, nw, bw, qw, kw, bw, nw, rw }
            };

            Assert.AreEqual(board, cb.GetBoard(), "Unexpected board layout after en passant capture.");
        }
ChessGameTests