AbstractGetShellResult.java

1
/*******************************************************************************
2
 * Copyhacked (H) 2012-2020.
3
 * This program and the accompanying materials
4
 * are made available under no term at all, use it like
5
 * you want, but share and discuss about it
6
 * every time possible with every body.
7
 * 
8
 * Contributors:
9
 *      ron190 at ymail dot com - initial implementation
10
 ******************************************************************************/
11
package com.jsql.view.swing.interaction;
12
13
import com.jsql.view.interaction.InteractionCommand;
14
import com.jsql.view.swing.shell.AbstractShell;
15
import com.jsql.view.swing.util.MediatorHelper;
16
17
import java.util.UUID;
18
19
/**
20
 * Append the result of a command in the terminal.
21
 */
22
public class AbstractGetShellResult implements InteractionCommand {
23
    
24
    /**
25
     * Unique identifier for the terminal. Used to output results of
26
     * commands in the right shell tab (in case of multiple shell opened).
27
     */
28
    private final UUID terminalID;
29
30
    /**
31
     * The result of a command executed in shell.
32
     */
33
    private final String result;
34
35
    /**
36
     * @param interactionParams The unique identifier of the terminal and the command's result to display
37
     */
38
    public AbstractGetShellResult(Object[] interactionParams) {
39
        
40
        this.terminalID = (UUID) interactionParams[0];
41
        this.result = (String) interactionParams[1];
42
    }
43
44
    @Override
45
    public void execute() {
46
        
47
        AbstractShell terminal = MediatorHelper.frame().getConsoles().get(this.terminalID);
48
        
49 1 1. execute : removed call to com/jsql/view/swing/shell/AbstractShell::append → NO_COVERAGE
        terminal.append(this.result);
50
        
51 1 1. execute : removed call to com/jsql/view/swing/shell/AbstractShell::append → NO_COVERAGE
        terminal.append("\n");
52 1 1. execute : removed call to com/jsql/view/swing/shell/AbstractShell::reset → NO_COVERAGE
        terminal.reset();
53
    }
54
}

Mutations

49

1.1
Location : execute
Killed by : none
removed call to com/jsql/view/swing/shell/AbstractShell::append → NO_COVERAGE

51

1.1
Location : execute
Killed by : none
removed call to com/jsql/view/swing/shell/AbstractShell::append → NO_COVERAGE

52

1.1
Location : execute
Killed by : none
removed call to com/jsql/view/swing/shell/AbstractShell::reset → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.16.1