1 | package org.hplr.tournament.core.usecases.service; | |
2 | ||
3 | import lombok.RequiredArgsConstructor; | |
4 | import org.hplr.tournament.core.model.Tournament; | |
5 | import org.hplr.tournament.core.model.TournamentSnapshot; | |
6 | import org.hplr.tournament.core.usecases.port.in.CreateTournamentUseCaseInterface; | |
7 | import org.hplr.tournament.core.usecases.port.out.command.SaveTournamentCommandInterface; | |
8 | import org.hplr.tournament.core.usecases.service.dto.InitialTournamentSaveDto; | |
9 | import org.springframework.stereotype.Service; | |
10 | ||
11 | import java.util.UUID; | |
12 | ||
13 | @Service | |
14 | @RequiredArgsConstructor | |
15 | public class CreateTournamentUseCaseService implements CreateTournamentUseCaseInterface { | |
16 | ||
17 | private final SaveTournamentCommandInterface saveTournamentCommandInterface; | |
18 | ||
19 | @Override | |
20 | public UUID createTournament(InitialTournamentSaveDto initialTournamentSaveDto) { | |
21 | Tournament tournament = Tournament.fromInitialDto(initialTournamentSaveDto); | |
22 | TournamentSnapshot tournamentSnapshot = tournament.toSnapshot(); | |
23 |
1
1. createTournament : removed call to org/hplr/tournament/core/usecases/port/out/command/SaveTournamentCommandInterface::saveTournament → KILLED |
saveTournamentCommandInterface.saveTournament(tournamentSnapshot); |
24 |
1
1. createTournament : replaced return value with null for org/hplr/tournament/core/usecases/service/CreateTournamentUseCaseService::createTournament → KILLED |
return tournamentSnapshot.tournamentId().tournamentId(); |
25 | } | |
26 | } | |
Mutations | ||
23 |
1.1 |
|
24 |
1.1 |