PlayerCommandAdapter.java

1
package org.hplr.user.infrastructure.dbadapter.adapters;
2
3
import lombok.RequiredArgsConstructor;
4
import org.hplr.user.core.model.PlayerFullDataSnapshot;
5
import org.hplr.user.core.usecases.port.out.command.SaveLastLoginDateCommandInterface;
6
import org.hplr.user.core.usecases.port.out.command.SavePlayerDataCommandInterface;
7
import org.hplr.user.infrastructure.dbadapter.mappers.PlayerMapper;
8
import org.hplr.user.infrastructure.dbadapter.repositories.PlayerCommandRepository;
9
import org.springframework.stereotype.Service;
10
11
import java.time.LocalDateTime;
12
import java.util.UUID;
13
14
@Service
15
@RequiredArgsConstructor
16
public class PlayerCommandAdapter implements SavePlayerDataCommandInterface, SaveLastLoginDateCommandInterface {
17
18
    final PlayerCommandRepository playerCommandRepository;
19
    @Override
20
    public void savePlayer(PlayerFullDataSnapshot playerFullDataSnapshot) {
21
        playerCommandRepository.save(PlayerMapper.toEntity(playerFullDataSnapshot));
22
    }
23
24
    @Override
25
    public void saveLastLoginDate(LocalDateTime lastLoginDate, UUID userId) {
26 1 1. saveLastLoginDate : removed call to org/hplr/user/infrastructure/dbadapter/repositories/PlayerCommandRepository::updateLastLoginDate → KILLED
        playerCommandRepository.updateLastLoginDate(lastLoginDate, userId);
27
    }
28
}

Mutations

26

1.1
Location : saveLastLoginDate
Killed by : org.hplr.user.infrastructure.dbadapter.adapters.PlayerCommandAdapterTests.[engine:junit-jupiter]/[class:org.hplr.user.infrastructure.dbadapter.adapters.PlayerCommandAdapterTests]/[method:save_last_login_date_for_player_and_succeed()]
removed call to org/hplr/user/infrastructure/dbadapter/repositories/PlayerCommandRepository::updateLastLoginDate → KILLED

Active mutators

Tests examined


Report generated by PIT 1.16.1