示例#1
0
 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);
 }
示例#2
0
 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);
 }