HttpHeader.java

1
package com.jsql.model.bean.util;
2
3
import java.util.Map;
4
5
/**
6
 * An HTTP object containing request and response data.
7
 */
8
public class HttpHeader {
9
    
10
    /**
11
     * GET request.
12
     */
13
    private final String url;
14
    
15
    /**
16
     * POST request.
17
     */
18
    private final String post;
19
    
20
    /**
21
     * Header request.
22
     */
23
    private final Map<String, String> header;
24
    
25
    /**
26
     * Header sent back by server.
27
     */
28
    private final Map<String, String> response;
29
    
30
    private final String source;
31
    
32
    /**
33
     * Create object containing HTTP data to display in Network panel.
34
     * @param url URL called
35
     * @param post POST text sent with url
36
     * @param header HEADER text sent with url
37
     * @param response RESPONSE header sent by url
38
     */
39
    public HttpHeader(
40
        String url,
41
        String post,
42
        Map<String, String> header,
43
        Map<String, String> response,
44
        String source
45
    ) {
46
        this.url = url;
47
        this.post = post;
48
        this.header = header;
49
        this.response = response;
50
        this.source = source;
51
    }
52
53
    @Override
54
    public String toString() {
55 1 1. toString : replaced return value with "" for com/jsql/model/bean/util/HttpHeader::toString → NO_COVERAGE
        return this.url;
56
    }
57
58
59
    // Getter
60
    
61
    public String getUrl() {
62 1 1. getUrl : replaced return value with "" for com/jsql/model/bean/util/HttpHeader::getUrl → NO_COVERAGE
        return this.url;
63
    }
64
65
    public String getPost() {
66 1 1. getPost : replaced return value with "" for com/jsql/model/bean/util/HttpHeader::getPost → NO_COVERAGE
        return this.post;
67
    }
68
69
    public Map<String, String> getHeader() {
70 1 1. getHeader : replaced return value with Collections.emptyMap for com/jsql/model/bean/util/HttpHeader::getHeader → NO_COVERAGE
        return this.header;
71
    }
72
73
    public Map<String, String> getResponse() {
74 1 1. getResponse : replaced return value with Collections.emptyMap for com/jsql/model/bean/util/HttpHeader::getResponse → NO_COVERAGE
        return this.response;
75
    }
76
77
    public String getSource() {
78 1 1. getSource : replaced return value with "" for com/jsql/model/bean/util/HttpHeader::getSource → NO_COVERAGE
        return this.source;
79
    }
80
}

Mutations

55

1.1
Location : toString
Killed by : none
replaced return value with "" for com/jsql/model/bean/util/HttpHeader::toString → NO_COVERAGE

62

1.1
Location : getUrl
Killed by : none
replaced return value with "" for com/jsql/model/bean/util/HttpHeader::getUrl → NO_COVERAGE

66

1.1
Location : getPost
Killed by : none
replaced return value with "" for com/jsql/model/bean/util/HttpHeader::getPost → NO_COVERAGE

70

1.1
Location : getHeader
Killed by : none
replaced return value with Collections.emptyMap for com/jsql/model/bean/util/HttpHeader::getHeader → NO_COVERAGE

74

1.1
Location : getResponse
Killed by : none
replaced return value with Collections.emptyMap for com/jsql/model/bean/util/HttpHeader::getResponse → NO_COVERAGE

78

1.1
Location : getSource
Killed by : none
replaced return value with "" for com/jsql/model/bean/util/HttpHeader::getSource → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.19.1