Browse Source

Refactoring: addOpponent-test more reliable

main
fdai7920 11 months ago
parent
commit
b6e021276f
  1. 6
      src/test/java/de/hsfulda/onses/PlayerServiceTest.java

6
src/test/java/de/hsfulda/onses/PlayerServiceTest.java

@ -54,8 +54,12 @@ public class PlayerServiceTest {
int expected = 3;
// act
PlayerService playerservice = new PlayerService();
int before = playerservice.getPlayerList().size();
playerservice.addOpponents(input);
int answer = playerservice.getPlayerList().size();
int after = playerservice.getPlayerList().size();
int answer = after - before;
// assert
assertEquals(expected, answer);
}

Loading…
Cancel
Save