public void GetPieceTest_notNull() { Board target = new Board(); Piece piece = PieceBuilder.MakePawn(new Point(1, 1), Side.Light); target.AddPiece(piece, new Point(1, 1)); // Adds a piece at (1,1) all other tiles will be null Point position = new Point(1, 1); // Look for piece at (1,1) Piece expected = piece; Piece actual; actual = target.GetPiece(position); Assert.AreEqual(expected, actual); }
public void GetPieceTest_null() { Board target = new Board(); Piece piece = PieceBuilder.MakePawn(new Point(1, 1), Side.Light); //Adds no piece Point position = new Point(1, 1); // Look for piece at (1,1) Piece expected = null; Piece actual; actual = target.GetPiece(position); Assert.AreEqual(expected, actual); }