RankElement.java

1
package sh.okx.rankup.ranks;
2
3
import lombok.Getter;
4
5
import java.util.Objects;
6
7
@Getter
8
public class RankElement<T extends Rank> {
9 2 1. isRootNode : replaced boolean return with true for sh/okx/rankup/ranks/RankElement::isRootNode → SURVIVED
2. isRootNode : replaced boolean return with false for sh/okx/rankup/ranks/RankElement::isRootNode → KILLED
  private boolean rootNode = true;
10 1 1. getRank : replaced return value with null for sh/okx/rankup/ranks/RankElement::getRank → KILLED
  private final T rank;
11 1 1. getNext : replaced return value with null for sh/okx/rankup/ranks/RankElement::getNext → KILLED
  private RankElement<T> next;
12
13
  public RankElement(T rank, RankElement<T> next) {
14
    Objects.requireNonNull(rank);
15
    this.rank = rank;
16
    this.next = next;
17
  }
18
19
  public void setRootNode(boolean rootNode) {
20
    this.rootNode = rootNode;
21
  }
22
23
  public boolean hasNext() {
24 2 1. hasNext : negated conditional → KILLED
2. hasNext : replaced boolean return with true for sh/okx/rankup/ranks/RankElement::hasNext → KILLED
    return next != null;
25
  }
26
27
  public void setNext(RankElement<T> next) {
28
    this.next = next;
29 1 1. setNext : removed call to sh/okx/rankup/ranks/RankElement::setRootNode → SURVIVED
    this.next.setRootNode(false);
30
  }
31
}

Mutations

9

1.1
Location : isRootNode
Killed by : sh.okx.rankup.requirements.MobKillsRequirementsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.requirements.MobKillsRequirementsTest]/[method:testMobKillsRequirements()]
replaced boolean return with false for sh/okx/rankup/ranks/RankElement::isRootNode → KILLED

2.2
Location : isRootNode
Killed by : none
replaced boolean return with true for sh/okx/rankup/ranks/RankElement::isRootNode → SURVIVED

10

1.1
Location : getRank
Killed by : sh.okx.rankup.requirements.MobKillsRequirementsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.requirements.MobKillsRequirementsTest]/[method:testMobKillsRequirements()]
replaced return value with null for sh/okx/rankup/ranks/RankElement::getRank → KILLED

11

1.1
Location : getNext
Killed by : sh.okx.rankup.RankupPlaceholderTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupPlaceholderTest]/[method:testStatusCurrent()]
replaced return value with null for sh/okx/rankup/ranks/RankElement::getNext → KILLED

24

1.1
Location : hasNext
Killed by : sh.okx.rankup.requirements.MobKillsRequirementsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.requirements.MobKillsRequirementsTest]/[method:testMobKillsRequirements()]
negated conditional → KILLED

2.2
Location : hasNext
Killed by : sh.okx.rankup.requirements.MobKillsRequirementsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.requirements.MobKillsRequirementsTest]/[method:testMobKillsRequirements()]
replaced boolean return with true for sh/okx/rankup/ranks/RankElement::hasNext → KILLED

29

1.1
Location : setNext
Killed by : none
removed call to sh/okx/rankup/ranks/RankElement::setRootNode → SURVIVED

Active mutators

Tests examined


Report generated by PIT 1.7.0