Action.java

1
package com.github.dakusui.actionunit.core;
2
3
import com.github.dakusui.actionunit.actions.*;
4
5
import java.util.Formattable;
6
7
public interface Action extends Formattable {
8
  void accept(Visitor visitor);
9
10
11
  abstract class Builder<A extends Action> {
12
    public abstract A build();
13
14
    /**
15
     * A synonym of {@code build()} method. This method is defined not to use a
16
     * method name 'build', which introduces extra word not relating to what is
17
     * being achieved.
18
     * <p>
19
     * If you prefer a word 'build' in your code, simply use {@code build}
20
     * method.
21
     *
22
     * @return An object built by {@code build} method.
23
     */
24
    final public A $() {
25 1 1. $ : replaced return value with null for com/github/dakusui/actionunit/core/Action$Builder::$ → KILLED
      return build();
26
    }
27
  }
28
29
  interface Visitor {
30
    @SuppressWarnings("unused")
31
    default void visit(Action action) {
32
      throw new UnsupportedOperationException();
33
    }
34
35
    default void visit(Leaf action) {
36 1 1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED
      this.visit((Action) action);
37
    }
38
39
    default void visit(Named action) {
40 1 1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED
      this.visit((Action) action);
41
    }
42
43
    default void visit(Composite action) {
44 1 1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED
      this.visit((Action) action);
45
    }
46
47
    default <E> void visit(ForEach<E> action) {
48 1 1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED
      this.visit((Action) action);
49
    }
50
51
    default void visit(While action) {
52 1 1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → NO_COVERAGE
      this.visit((Action) action);
53
    }
54
55
    default void visit(When action) {
56 1 1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED
      this.visit((Action) action);
57
    }
58
59
    default <V> void visit(With<V> action) {
60 1 1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → NO_COVERAGE
      this.visit((Action) action);
61
    }
62
63
    default void visit(Attempt action) {
64 1 1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED
      this.visit((Action) action);
65
    }
66
67
    default void visit(Retry action) {
68 1 1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED
      this.visit((Action) action);
69
    }
70
71
    default void visit(TimeOut action) {
72 1 1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED
      this.visit((Action) action);
73
    }
74
  }
75
}

Mutations

25

1.1
Location : $
Killed by : com.github.dakusui.actionunit.scenarios.CompatActionSupportTest.givenTimeoutAction$whenDescribe$thenLooksNice(com.github.dakusui.actionunit.scenarios.CompatActionSupportTest)
replaced return value with null for com/github/dakusui/actionunit/core/Action$Builder::$ → KILLED

36

1.1
Location : visit
Killed by : com.github.dakusui.actionunit.ut.ActionVisitorTest.givenSimpleAction$whenAccept$thenVisited(com.github.dakusui.actionunit.ut.ActionVisitorTest)
removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED

40

1.1
Location : visit
Killed by : com.github.dakusui.actionunit.ut.ActionVisitorTest.givenNamesAction$whenAccept$thenVisited(com.github.dakusui.actionunit.ut.ActionVisitorTest)
removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED

44

1.1
Location : visit
Killed by : com.github.dakusui.actionunit.ut.ActionVisitorTest.givenCompositeAction$whenAccept$thenVisited(com.github.dakusui.actionunit.ut.ActionVisitorTest)
removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED

48

1.1
Location : visit
Killed by : com.github.dakusui.actionunit.ut.ActionVisitorTest.givenForEachAction$whenAccept$thenVisited(com.github.dakusui.actionunit.ut.ActionVisitorTest)
removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED

52

1.1
Location : visit
Killed by : none
removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → NO_COVERAGE

56

1.1
Location : visit
Killed by : com.github.dakusui.actionunit.ut.ActionVisitorTest.givenWhenAction$whenAccept$thenVisited(com.github.dakusui.actionunit.ut.ActionVisitorTest)
removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED

60

1.1
Location : visit
Killed by : none
removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → NO_COVERAGE

64

1.1
Location : visit
Killed by : com.github.dakusui.actionunit.ut.ActionVisitorTest.givenAttemptAction$whenAccept$thenVisited(com.github.dakusui.actionunit.ut.ActionVisitorTest)
removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED

68

1.1
Location : visit
Killed by : com.github.dakusui.actionunit.ut.ActionVisitorTest.givenRetryAction$whenAccept$thenVisited(com.github.dakusui.actionunit.ut.ActionVisitorTest)
removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED

72

1.1
Location : visit
Killed by : com.github.dakusui.actionunit.ut.ActionVisitorTest.givenTimeOutAction$whenAccept$thenVisited(com.github.dakusui.actionunit.ut.ActionVisitorTest)
removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3