MediatorMethod.java

1
package com.jsql.model.injection.method;
2
3
import com.jsql.model.InjectionModel;
4
5
import java.util.AbstractMap.SimpleEntry;
6
import java.util.Arrays;
7
import java.util.List;
8
9
public class MediatorMethod {
10
11
    private final AbstractMethodInjection query;
12
    private final AbstractMethodInjection request;
13
    private final AbstractMethodInjection header;
14
    
15
    private final List<AbstractMethodInjection> methods;
16
    
17
    public MediatorMethod(InjectionModel injectionModel) {
18
        
19
        this.query = new AbstractMethodInjection(injectionModel) {
20
            
21
            @Override
22
            public boolean isCheckingAllParam() {
23 2 1. isCheckingAllParam : replaced boolean return with false for com/jsql/model/injection/method/MediatorMethod$1::isCheckingAllParam → NO_COVERAGE
2. isCheckingAllParam : replaced boolean return with true for com/jsql/model/injection/method/MediatorMethod$1::isCheckingAllParam → NO_COVERAGE
                return this.injectionModel.getMediatorUtils().getPreferencesUtil().isCheckingAllURLParam();
24
            }
25
26
            @Override
27
            public String getParamsAsString() {
28 1 1. getParamsAsString : replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$1::getParamsAsString → NO_COVERAGE
                return this.injectionModel.getMediatorUtils().getParameterUtil().getQueryStringFromEntries();
29
            }
30
31
            @Override
32
            public List<SimpleEntry<String, String>> getParams() {
33 1 1. getParams : replaced return value with Collections.emptyList for com/jsql/model/injection/method/MediatorMethod$1::getParams → NO_COVERAGE
                return this.injectionModel.getMediatorUtils().getParameterUtil().getListQueryString();
34
            }
35
36
            @Override
37
            public String name() {
38 1 1. name : replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$1::name → NO_COVERAGE
                return "Query";
39
            }
40
        };
41
42
        this.request = new AbstractMethodInjection(injectionModel) {
43
44
            @Override
45
            public boolean isCheckingAllParam() {
46 2 1. isCheckingAllParam : replaced boolean return with true for com/jsql/model/injection/method/MediatorMethod$2::isCheckingAllParam → NO_COVERAGE
2. isCheckingAllParam : replaced boolean return with false for com/jsql/model/injection/method/MediatorMethod$2::isCheckingAllParam → NO_COVERAGE
                return this.injectionModel.getMediatorUtils().getPreferencesUtil().isCheckingAllRequestParam();
47
            }
48
49
            @Override
50
            public String getParamsAsString() {
51 1 1. getParamsAsString : replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$2::getParamsAsString → NO_COVERAGE
                return this.injectionModel.getMediatorUtils().getParameterUtil().getRequestFromEntries();
52
            }
53
54
            @Override
55
            public List<SimpleEntry<String, String>> getParams() {
56 1 1. getParams : replaced return value with Collections.emptyList for com/jsql/model/injection/method/MediatorMethod$2::getParams → NO_COVERAGE
                return this.injectionModel.getMediatorUtils().getParameterUtil().getListRequest();
57
            }
58
59
            @Override
60
            public String name() {
61 1 1. name : replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$2::name → NO_COVERAGE
                return "Request";
62
            }
63
        };
64
        
65
        this.header = new AbstractMethodInjection(injectionModel) {
66
            
67
            @Override
68
            public boolean isCheckingAllParam() {
69 2 1. isCheckingAllParam : replaced boolean return with false for com/jsql/model/injection/method/MediatorMethod$3::isCheckingAllParam → NO_COVERAGE
2. isCheckingAllParam : replaced boolean return with true for com/jsql/model/injection/method/MediatorMethod$3::isCheckingAllParam → NO_COVERAGE
                return this.injectionModel.getMediatorUtils().getPreferencesUtil().isCheckingAllHeaderParam();
70
            }
71
72
            @Override
73
            public String getParamsAsString() {
74 1 1. getParamsAsString : replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$3::getParamsAsString → NO_COVERAGE
                return this.injectionModel.getMediatorUtils().getParameterUtil().getHeaderFromEntries();
75
            }
76
77
            @Override
78
            public List<SimpleEntry<String, String>> getParams() {
79 1 1. getParams : replaced return value with Collections.emptyList for com/jsql/model/injection/method/MediatorMethod$3::getParams → NO_COVERAGE
                return this.injectionModel.getMediatorUtils().getParameterUtil().getListHeader();
80
            }
81
82
            @Override
83
            public String name() {
84 1 1. name : replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$3::name → NO_COVERAGE
                return "Header";
85
            }
86
        };
87
        
88
        this.methods = Arrays.asList(this.query, this.request, this.header);
89
    }
90
91
    public AbstractMethodInjection getQuery() {
92 1 1. getQuery : replaced return value with null for com/jsql/model/injection/method/MediatorMethod::getQuery → SURVIVED
        return this.query;
93
    }
94
95
    public AbstractMethodInjection getRequest() {
96 1 1. getRequest : replaced return value with null for com/jsql/model/injection/method/MediatorMethod::getRequest → SURVIVED
        return this.request;
97
    }
98
99
    public AbstractMethodInjection getHeader() {
100 1 1. getHeader : replaced return value with null for com/jsql/model/injection/method/MediatorMethod::getHeader → SURVIVED
        return this.header;
101
    }
102
103
    public List<AbstractMethodInjection> getMethods() {
104 1 1. getMethods : replaced return value with Collections.emptyList for com/jsql/model/injection/method/MediatorMethod::getMethods → NO_COVERAGE
        return this.methods;
105
    }
106
}

Mutations

23

1.1
Location : isCheckingAllParam
Killed by : none
replaced boolean return with false for com/jsql/model/injection/method/MediatorMethod$1::isCheckingAllParam → NO_COVERAGE

2.2
Location : isCheckingAllParam
Killed by : none
replaced boolean return with true for com/jsql/model/injection/method/MediatorMethod$1::isCheckingAllParam → NO_COVERAGE

28

1.1
Location : getParamsAsString
Killed by : none
replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$1::getParamsAsString → NO_COVERAGE

33

1.1
Location : getParams
Killed by : none
replaced return value with Collections.emptyList for com/jsql/model/injection/method/MediatorMethod$1::getParams → NO_COVERAGE

38

1.1
Location : name
Killed by : none
replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$1::name → NO_COVERAGE

46

1.1
Location : isCheckingAllParam
Killed by : none
replaced boolean return with true for com/jsql/model/injection/method/MediatorMethod$2::isCheckingAllParam → NO_COVERAGE

2.2
Location : isCheckingAllParam
Killed by : none
replaced boolean return with false for com/jsql/model/injection/method/MediatorMethod$2::isCheckingAllParam → NO_COVERAGE

51

1.1
Location : getParamsAsString
Killed by : none
replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$2::getParamsAsString → NO_COVERAGE

56

1.1
Location : getParams
Killed by : none
replaced return value with Collections.emptyList for com/jsql/model/injection/method/MediatorMethod$2::getParams → NO_COVERAGE

61

1.1
Location : name
Killed by : none
replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$2::name → NO_COVERAGE

69

1.1
Location : isCheckingAllParam
Killed by : none
replaced boolean return with false for com/jsql/model/injection/method/MediatorMethod$3::isCheckingAllParam → NO_COVERAGE

2.2
Location : isCheckingAllParam
Killed by : none
replaced boolean return with true for com/jsql/model/injection/method/MediatorMethod$3::isCheckingAllParam → NO_COVERAGE

74

1.1
Location : getParamsAsString
Killed by : none
replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$3::getParamsAsString → NO_COVERAGE

79

1.1
Location : getParams
Killed by : none
replaced return value with Collections.emptyList for com/jsql/model/injection/method/MediatorMethod$3::getParams → NO_COVERAGE

84

1.1
Location : name
Killed by : none
replaced return value with "" for com/jsql/model/injection/method/MediatorMethod$3::name → NO_COVERAGE

92

1.1
Location : getQuery
Killed by : none
replaced return value with null for com/jsql/model/injection/method/MediatorMethod::getQuery → SURVIVED

96

1.1
Location : getRequest
Killed by : none
replaced return value with null for com/jsql/model/injection/method/MediatorMethod::getRequest → SURVIVED

100

1.1
Location : getHeader
Killed by : none
replaced return value with null for com/jsql/model/injection/method/MediatorMethod::getHeader → SURVIVED

104

1.1
Location : getMethods
Killed by : none
replaced return value with Collections.emptyList for com/jsql/model/injection/method/MediatorMethod::getMethods → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.16.1