Skip to content

Commit

Permalink
open rewrite updates (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbusche authored Jul 31, 2024
1 parent 01a5657 commit 4159b59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/trap/report/DownloadHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -30,7 +30,7 @@ public void downloadFiles(String[] trapTypes) throws IOException {
logger.info("Finished downloading {} file", type);

logger.info("Replacing double spaces for {} file", type);
var path = Paths.get(type + ".csv");
var path = Path.of(type + ".csv");
var content = Files.readString(path, charset).replaceAll(" {2}", " ");
Files.writeString(path, content, charset);
logger.info("Finished replacing double spaces for {} file", type);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/trap/report/TrapHelperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ void testPlayerIndividualTotals() {

var player1 = playerIndividualTotal.get(roundScoresPlayer1.getFirst().getUniqueName());
assertEquals(4, player1.size());
assertEquals(49, player1.get(0).getTotal());
assertEquals(49, player1.getFirst().getTotal());
assertEquals(48, player1.get(1).getTotal());
assertEquals(48, player1.get(2).getTotal());
assertEquals(48, player1.get(3).getTotal());

var player2 = playerIndividualTotal.get(roundScoresPlayer2.getFirst().getUniqueName());
assertEquals(4, player2.size());
assertEquals(49, player2.get(0).getTotal());
assertEquals(49, player2.getFirst().getTotal());
assertEquals(49, player2.get(1).getTotal());
assertEquals(49, player2.get(2).getTotal());
assertEquals(40, player2.get(3).getTotal());
Expand Down

0 comments on commit 4159b59

Please sign in to comment.