ExploitMode.java

1
package com.jsql.model.accessible;
2
3
import java.util.Arrays;
4
import java.util.Optional;
5
6
public enum ExploitMode {
7
8
    AUTO("MODE_AUTO", "MODE_AUTO_TOOLTIP"),
9
    QUERY_BODY("MODE_QUERY_BODY", "MODE_QUERY_BODY_TOOLTIP"),
10
    TEMP_TABLE("MODE_TEMP_TABLE", "MODE_TEMP_TABLE_TOOLTIP"),
11
    NETSHARE("MODE_NETSHARE", "MODE_NETSHARE_TOOLTIP");
12
13
    private final String keyLabel;
14
    private final String keyTooltip;
15
16
    ExploitMode(String keyLabel, String keyTooltip) {
17
        this.keyLabel = keyLabel;
18
        this.keyTooltip = keyTooltip;
19
    }
20
21
    public static Optional<ExploitMode> forName(String label) {  // used with toString() giving enum name
22 1 1. forName : replaced return value with Optional.empty for com/jsql/model/accessible/ExploitMode::forName → NO_COVERAGE
        return Arrays.stream(ExploitMode.values())
23 2 1. lambda$forName$0 : replaced boolean return with false for com/jsql/model/accessible/ExploitMode::lambda$forName$0 → NO_COVERAGE
2. lambda$forName$0 : replaced boolean return with true for com/jsql/model/accessible/ExploitMode::lambda$forName$0 → NO_COVERAGE
        .filter(action -> label.equals(action.name()))
24
        .findFirst();
25
    }
26
27
    public String getKeyLabel() {
28 1 1. getKeyLabel : replaced return value with "" for com/jsql/model/accessible/ExploitMode::getKeyLabel → NO_COVERAGE
        return this.keyLabel;
29
    }
30
31
    public String getKeyTooltip() {
32 1 1. getKeyTooltip : replaced return value with "" for com/jsql/model/accessible/ExploitMode::getKeyTooltip → NO_COVERAGE
        return this.keyTooltip;
33
    }
34
}

Mutations

22

1.1
Location : forName
Killed by : none
replaced return value with Optional.empty for com/jsql/model/accessible/ExploitMode::forName → NO_COVERAGE

23

1.1
Location : lambda$forName$0
Killed by : none
replaced boolean return with false for com/jsql/model/accessible/ExploitMode::lambda$forName$0 → NO_COVERAGE

2.2
Location : lambda$forName$0
Killed by : none
replaced boolean return with true for com/jsql/model/accessible/ExploitMode::lambda$forName$0 → NO_COVERAGE

28

1.1
Location : getKeyLabel
Killed by : none
replaced return value with "" for com/jsql/model/accessible/ExploitMode::getKeyLabel → NO_COVERAGE

32

1.1
Location : getKeyTooltip
Killed by : none
replaced return value with "" for com/jsql/model/accessible/ExploitMode::getKeyTooltip → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.22.1