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
    AUTO("MODE_AUTO", "MODE_AUTO_TOOLTIP"),
8
    QUERY_BODY("MODE_QUERY_BODY", "MODE_QUERY_BODY_TOOLTIP"),
9
    TEMP_TABLE("MODE_TEMP_TABLE", "MODE_TEMP_TABLE_TOOLTIP"),
10
    NETSHARE("MODE_NETSHARE", "MODE_NETSHARE_TOOLTIP");
11
    private final String keyLabel;
12
    private final String keyTooltip;
13
    ExploitMode(String keyLabel, String keyTooltip) {
14
        this.keyLabel = keyLabel;
15
        this.keyTooltip = keyTooltip;
16
    }
17
    public static Optional<ExploitMode> forName(String label) {  // used with toString() giving enum name
18 1 1. forName : replaced return value with Optional.empty for com/jsql/model/accessible/ExploitMode::forName → NO_COVERAGE
        return Arrays.stream(ExploitMode.values())
19 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()))
20
        .findFirst();
21
    }
22
23
    public String getKeyLabel() {
24 1 1. getKeyLabel : replaced return value with "" for com/jsql/model/accessible/ExploitMode::getKeyLabel → NO_COVERAGE
        return this.keyLabel;
25
    }
26
27
    public String getKeyTooltip() {
28 1 1. getKeyTooltip : replaced return value with "" for com/jsql/model/accessible/ExploitMode::getKeyTooltip → NO_COVERAGE
        return this.keyTooltip;
29
    }
30
}

Mutations

18

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

19

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

24

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

28

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.19.1