GetAllAvailableGamesUseCaseService.java

1
package org.hplr.game.core.usecases.service;
2
3
import lombok.RequiredArgsConstructor;
4
import org.hplr.game.core.model.Game;
5
import org.hplr.game.core.model.GameSnapshot;
6
import org.hplr.game.core.usecases.port.dto.GameSelectDto;
7
import org.hplr.game.core.usecases.port.in.GetAllAvailableGamesUseCaseInterface;
8
import org.hplr.game.core.usecases.port.out.query.SelectCreatedGamesByPlayerIdNotMatchingQueryInterface;
9
import org.springframework.stereotype.Service;
10
11
import java.util.List;
12
import java.util.UUID;
13
14
@Service
15
@RequiredArgsConstructor
16
public class GetAllAvailableGamesUseCaseService implements GetAllAvailableGamesUseCaseInterface {
17
18
    private final SelectCreatedGamesByPlayerIdNotMatchingQueryInterface selectCreatedGamesByPlayerIdNotMatchingQueryInterface;
19
    @Override
20
    public List<GameSnapshot> getAllAvailableGames(UUID playerId) {
21
        List<GameSelectDto> gameSelectDtoList = selectCreatedGamesByPlayerIdNotMatchingQueryInterface.selectCreatedGamesByPlayerIdNotMatching(playerId);
22 1 1. getAllAvailableGames : replaced return value with Collections.emptyList for org/hplr/game/core/usecases/service/GetAllAvailableGamesUseCaseService::getAllAvailableGames → KILLED
        return gameSelectDtoList.stream().map(Game::fromDto).map(Game::toSnapshot).toList();
23
    }
24
}

Mutations

22

1.1
Location : getAllAvailableGames
Killed by : org.hplr.game.core.usecases.service.GetAllAvailableGamesUseCaseServiceTests.[engine:junit-jupiter]/[class:org.hplr.game.core.usecases.service.GetAllAvailableGamesUseCaseServiceTests]/[method:select_created_game_find_existing_and_succeed()]
replaced return value with Collections.emptyList for org/hplr/game/core/usecases/service/GetAllAvailableGamesUseCaseService::getAllAvailableGames → KILLED

Active mutators

Tests examined


Report generated by PIT 1.16.1