TedeeLockRepository.java

1
package org.sanmibuh.tedee.lock.infrastructure.secondary;
2
3
import java.util.Optional;
4
import org.sanmibuh.tedee.lock.domain.Lock;
5
import org.sanmibuh.tedee.lock.domain.LockRepository;
6
import org.sanmibuh.tedee.lock.domain.vo.LockId;
7
import org.sanmibuh.tedee.lock.domain.vo.LockStatus;
8
import org.springframework.stereotype.Repository;
9
10
@Repository
11
public final class TedeeLockRepository implements LockRepository {
12
13
  @Override
14
  public Optional<Lock> findById(final LockId lockId) {
15 1 1. findById : replaced return value with Optional.empty for org/sanmibuh/tedee/lock/infrastructure/secondary/TedeeLockRepository::findById → KILLED
    return Optional.of(new Lock(lockId, LockStatus.UNLOCKED));
16
  }
17
18
  @Override
19
  public void save(final Lock lock) {
20
    // No persistence store yet: locking is a reaction to the LockRequested domain event,
21
    // handled by LockRequestedHandler. Persisting aggregate state belongs here once a store exists.
22
  }
23
}

Mutations

15

1.1
Location : findById
Killed by : org.sanmibuh.tedee.lock.infrastructure.secondary.TedeeLockRepositoryTest.[engine:junit-jupiter]/[class:org.sanmibuh.tedee.lock.infrastructure.secondary.TedeeLockRepositoryTest]/[method:should_returnLock_whenFindingById()]
replaced return value with Optional.empty for org/sanmibuh/tedee/lock/infrastructure/secondary/TedeeLockRepository::findById → KILLED

Active mutators

Tests examined


Report generated by PIT 1.30.0 support