We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 857ad00 commit 3c39df3Copy full SHA for 3c39df3
1 file changed
2026-02-05-Retro_Copilot/src/test/java/de/hilling/chess/ChessGameTest.java
@@ -56,21 +56,17 @@ void illegalMoveCharacters() {
56
57
@Test
58
void illegalMoveMoveNotPossibleForPawn() {
59
- try {
60
- chessGame.move("a2a5");
61
- fail("Illegal move exception");
62
- } catch (IllegalArgumentException iae) {
63
- assertEquals("Invalid pawn move", iae.getMessage());
64
- }
+ IllegalArgumentException iae = assertThrows(IllegalArgumentException.class, () -> chessGame.move("a2a5"));
+ assertEquals("Invalid pawn move", iae.getMessage());
65
}
66
67
68
void movePawn() {
69
chessGame.move("e2e4");
70
assertEquals(E2E4_POSITION, chessGame.toString());
71
72
- @Test
73
+ @Test
74
void movePawns() {
75
76
chessGame.move("e7e5");
0 commit comments