Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kestutis-Z
committed
Nov 7, 2012
1 parent
76dac42
commit 1de79bb
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package chess; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.Test; | ||
|
||
public class PieceTest { | ||
|
||
@Test | ||
public void testGetPieceAbbreviation() { | ||
Piece pc1 = Piece.BLACK_BISHOP_2; | ||
String expectedAbbreviation = "BB2"; | ||
String actualAbbreviation = pc1.getPieceAbbreviation(); | ||
|
||
assertEquals(expectedAbbreviation, actualAbbreviation); | ||
|
||
Piece pc2 = Piece.WHITE_KNIGHT; | ||
expectedAbbreviation = "WN"; | ||
actualAbbreviation = pc2.getPieceAbbreviation(); | ||
|
||
assertEquals(expectedAbbreviation, actualAbbreviation); | ||
|
||
Piece pc3 = Piece.WHITE_PAWN_3; | ||
expectedAbbreviation = "WP3"; | ||
actualAbbreviation = pc3.getPieceAbbreviation(); | ||
|
||
assertEquals(expectedAbbreviation, actualAbbreviation); | ||
} | ||
|
||
} |
Binary file not shown.
Binary file not shown.