Skip to content

Commit

Permalink
unit tests for MultiplayerSession (fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
uo288061 committed Apr 26, 2024
1 parent 4ea0663 commit ccc1a72
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public MultiplayerSessionImpl(PlayerRepository playerRepository, MultiplayerSess
}

@Override
//@Transactional
@Transactional
public Map<Player, Integer> getPlayersWithScores(int multiplayerCode) {
MultiplayerSession session = multiplayerSessionRepository.findByMultiplayerCode(String.valueOf(multiplayerCode));
Map<Player, Integer> playerScores = session.getPlayerScores();
Expand All @@ -50,7 +50,7 @@ public void multiCreate(String code, Long id) {
}

@Override
//@Transactional
@Transactional
public void addToLobby(String code, Long id) {
Player p = playerRepository.findById(id).get();
MultiplayerSession ms=multiplayerSessionRepository.findByMultiplayerCode(code);
Expand All @@ -59,7 +59,7 @@ public void addToLobby(String code, Long id) {
}

@Override
//@Transactional
@Transactional
public void changeScore(String code, Long id, int score) {
Player p = playerRepository.findById(id).get();
MultiplayerSession ms=multiplayerSessionRepository.findByMultiplayerCode(code);
Expand Down

0 comments on commit ccc1a72

Please sign in to comment.