|
|
@ -53,7 +53,8 @@ class PlayerManagerTest { |
|
|
|
|
|
|
|
private static Stream<Arguments> testCasesForLoadPlayers() { |
|
|
|
return Stream.of(Arguments.of("EmptyFileReturnsEmtpyList", "", "src/test/java/resources/player_testdata.csv", List.of()), |
|
|
|
Arguments.of("OnePlayerInFileReturnsListWithOneElement", "Tobias;50", "src/test/java/resources/player_testdata.csv", List.of(new Player("Tobias", 50))), |
|
|
|
Arguments.of("OnePlayerInFileReturnsListWithOneElement", "Tobias;50", "src/test/java/resources/player_testdata.csv", |
|
|
|
List.of(new Player("Tobias", 50))), |
|
|
|
Arguments.of("MorePlayersInFileReturnLongerList", "Tobias;50\nLorenz;40\nSteffen;60", "src/test/java/resources/player_testdata.csv", |
|
|
|
List.of(new Player("Tobias", 50), new Player("Lorenz", 40), new Player("Steffen", 60)))); |
|
|
|
} |
|
|
@ -69,7 +70,9 @@ class PlayerManagerTest { |
|
|
|
} |
|
|
|
|
|
|
|
private static Stream<Arguments> testCasesForSavePlayers() { |
|
|
|
return Stream.of(Arguments.of("EmptyListIsWrittenAsEmptyFile", "src/test/java/resources/player_testdata2.csv", List.of())); |
|
|
|
return Stream.of(Arguments.of("EmptyListIsWrittenAsEmptyFile", "src/test/java/resources/player_testdata2.csv", List.of()), |
|
|
|
Arguments.of("WriteElementsOfListToFile", "src/test/java/resources/player_testdata2.csv", |
|
|
|
List.of(new Player("Tobias", 50), new Player("Steffen", 60)))); |
|
|
|
} |
|
|
|
|
|
|
|
} |