RadioLinkMethod.java

1
package com.jsql.view.swing.radio;
2
3
import com.jsql.model.injection.method.AbstractMethodInjection;
4
import com.jsql.view.swing.util.MediatorHelper;
5
6
import javax.swing.*;
7
import java.util.ArrayList;
8
import java.util.List;
9
10
/**
11
 * Radio label for HTTP method (GET, POST, etc.).
12
 */
13
public class RadioLinkMethod extends AbstractRadioLink {
14
    
15
    /**
16
     * Group of radio label for address bar.
17
     */
18
    private static final List<JLabel> groupMethod = new ArrayList<>();
19
20
    private final AbstractMethodInjection methodInjection;
21
22
    /**
23
     * A default radio label selected.
24
     * @param string Text for radio label
25
     * @param isSelected True if radio label should be selected
26
     * @param method
27
     */
28
    public RadioLinkMethod(String string, boolean isSelected, AbstractMethodInjection method) {
29
        
30
        super(string, isSelected);
31
        
32 1 1. <init> : removed call to com/jsql/view/swing/radio/RadioLinkMethod::init → NO_COVERAGE
        this.init();
33
        this.methodInjection = method;
34
    }
35
36
    /**
37
     * Add radio to the radio group.
38
     */
39
    private void init() {
40
        
41 1 1. init : removed call to com/jsql/view/swing/radio/RadioLinkMethod::addMouseListener → NO_COVERAGE
        this.addMouseListener(new RadioMethodMouseAdapter());
42
        RadioLinkMethod.groupMethod.add(this);
43
    }
44
45
    @Override
46
    public void action() {
47 1 1. action : removed call to com/jsql/view/swing/panel/PanelAddressBar::setMethodInjection → NO_COVERAGE
        MediatorHelper.panelAddressBar().setMethodInjection(this.methodInjection);
48
    }
49
50
    @Override
51
    public List<JLabel> getGroup() {
52 1 1. getGroup : replaced return value with Collections.emptyList for com/jsql/view/swing/radio/RadioLinkMethod::getGroup → NO_COVERAGE
        return RadioLinkMethod.groupMethod;
53
    }
54
}

Mutations

32

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/radio/RadioLinkMethod::init → NO_COVERAGE

41

1.1
Location : init
Killed by : none
removed call to com/jsql/view/swing/radio/RadioLinkMethod::addMouseListener → NO_COVERAGE

47

1.1
Location : action
Killed by : none
removed call to com/jsql/view/swing/panel/PanelAddressBar::setMethodInjection → NO_COVERAGE

52

1.1
Location : getGroup
Killed by : none
replaced return value with Collections.emptyList for com/jsql/view/swing/radio/RadioLinkMethod::getGroup → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.16.1