|
@ -0,0 +1,34 @@ |
|
|
|
|
|
package Game.ChessObj; |
|
|
|
|
|
|
|
|
|
|
|
import org.junit.jupiter.api.AfterEach; |
|
|
|
|
|
import org.junit.jupiter.api.BeforeEach; |
|
|
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
|
|
|
|
|
|
|
|
|
class ChessFigureTest { |
|
|
|
|
|
|
|
|
|
|
|
@BeforeEach |
|
|
|
|
|
void setUp() { |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@AfterEach |
|
|
|
|
|
void tearDown() { |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
void getSymbol() { |
|
|
|
|
|
assertEquals(" K ", new ChessFigure(ChessFigure.Type.KING, ChessFigure.Team.WHITE).getSymbol()); |
|
|
|
|
|
assertEquals(" Q ", new ChessFigure(ChessFigure.Type.QUEEN, ChessFigure.Team.WHITE).getSymbol()); |
|
|
|
|
|
assertEquals(" I ", new ChessFigure(ChessFigure.Type.BISHOP, ChessFigure.Team.WHITE).getSymbol()); |
|
|
|
|
|
assertEquals(" T ", new ChessFigure(ChessFigure.Type.CASTLE, ChessFigure.Team.WHITE).getSymbol()); |
|
|
|
|
|
assertEquals(" Z ", new ChessFigure(ChessFigure.Type.KNIGHT, ChessFigure.Team.WHITE).getSymbol()); |
|
|
|
|
|
assertEquals(" o ", new ChessFigure(ChessFigure.Type.PAWN, ChessFigure.Team.WHITE).getSymbol()); |
|
|
|
|
|
assertEquals("|K|", new ChessFigure(ChessFigure.Type.KING, ChessFigure.Team.BLACK).getSymbol()); |
|
|
|
|
|
assertEquals("|Q|", new ChessFigure(ChessFigure.Type.QUEEN, ChessFigure.Team.BLACK).getSymbol()); |
|
|
|
|
|
assertEquals("|I|", new ChessFigure(ChessFigure.Type.BISHOP, ChessFigure.Team.BLACK).getSymbol()); |
|
|
|
|
|
assertEquals("|T|", new ChessFigure(ChessFigure.Type.CASTLE, ChessFigure.Team.BLACK).getSymbol()); |
|
|
|
|
|
assertEquals("|Z|", new ChessFigure(ChessFigure.Type.KNIGHT, ChessFigure.Team.BLACK).getSymbol()); |
|
|
|
|
|
assertEquals("|o|", new ChessFigure(ChessFigure.Type.PAWN, ChessFigure.Team.BLACK).getSymbol()); |
|
|
|
|
|
} |
|
|
|
|
|
} |