FileLabelStore.java

1
package com.rox.debug.labels;
2
3
import java.io.IOException;
4
import java.nio.file.Path;
5
import java.util.List;
6
7
/** A {@link LabelStore} backed by a {@link LabelFile} - e.g. {@code SavePaths.labelsFile(romPath)}. */
8
public final class FileLabelStore implements LabelStore {
9
    private final Path path;
10
11
    public FileLabelStore(final Path path){
12
        this.path = path;
13
    }
14
15
    @Override
16
    public List<MemoryLabel> load() throws IOException, LabelFileException {
17 1 1. load : replaced return value with Collections.emptyList for com/rox/debug/labels/FileLabelStore::load → KILLED
        return LabelFile.read(path);
18
    }
19
20
    @Override
21
    public void save(final List<MemoryLabel> labels) throws IOException {
22 1 1. save : removed call to com/rox/debug/labels/LabelFile::write → KILLED
        LabelFile.write(path, labels);
23
    }
24
}

Mutations

17

1.1
Location : load
Killed by : com.rox.debug.labels.FileLabelStoreTest.[engine:junit-jupiter]/[class:com.rox.debug.labels.FileLabelStoreTest]/[method:savesAndLoadsThroughTheLabelsFile(java.nio.file.Path)]
replaced return value with Collections.emptyList for com/rox/debug/labels/FileLabelStore::load → KILLED

22

1.1
Location : save
Killed by : com.rox.debug.labels.FileLabelStoreTest.[engine:junit-jupiter]/[class:com.rox.debug.labels.FileLabelStoreTest]/[method:savesAndLoadsThroughTheLabelsFile(java.nio.file.Path)]
removed call to com/rox/debug/labels/LabelFile::write → KILLED

Active mutators

Tests examined


Report generated by PIT 1.22.1