RankupHelper.java

1
package sh.okx.rankup;
2
3
import java.util.HashMap;
4
import java.util.Map;
5
import java.util.Objects;
6
import org.bukkit.Bukkit;
7
import org.bukkit.configuration.ConfigurationSection;
8
import org.bukkit.entity.Player;
9
import sh.okx.rankup.events.PlayerPrestigeEvent;
10
import sh.okx.rankup.events.PlayerRankupEvent;
11
import sh.okx.rankup.hook.GroupProvider;
12
import sh.okx.rankup.messages.Message;
13
import sh.okx.rankup.prestige.Prestige;
14
import sh.okx.rankup.prestige.Prestiges;
15
import sh.okx.rankup.ranks.Rank;
16
import sh.okx.rankup.ranks.RankElement;
17
import sh.okx.rankup.ranks.Rankups;
18
19
/**
20
 * Actually performs the ranking up and prestiging for the plugin and also manages the cooldowns
21
 * between ranking up.
22
 */
23
public class RankupHelper {
24
25
  private final RankupPlugin plugin;
26
  private final ConfigurationSection config;
27
  private final GroupProvider permissions;
28
  /**
29
   * Players who cannot rankup/prestige for a certain amount of time.
30
   */
31
  private final Map<Player, Long> cooldowns = new HashMap<>();
32
33
  public RankupHelper(RankupPlugin plugin) {
34
    this.plugin = plugin;
35
    this.config = plugin.getConfig();
36
    this.permissions = plugin.getPermissions();
37
  }
38
39
  public void doRankup(Player player, RankElement<Rank> rank) {
40 1 1. doRankup : negated conditional → SURVIVED
    if (rank.getRank() != null) {
41 1 1. doRankup : removed call to sh/okx/rankup/hook/GroupProvider::removeGroup → SURVIVED
      permissions.removeGroup(player.getUniqueId(), rank.getRank().getRank());
42
    }
43 1 1. doRankup : removed call to sh/okx/rankup/hook/GroupProvider::addGroup → KILLED
    permissions.addGroup(player.getUniqueId(), rank.getNext().getRank().getRank());
44
45 1 1. doRankup : removed call to sh/okx/rankup/ranks/Rank::runCommands → SURVIVED
    rank.getRank().runCommands(player, rank.getNext().getRank());
46
47 1 1. doRankup : removed call to org/bukkit/plugin/PluginManager::callEvent → SURVIVED
    Bukkit.getPluginManager().callEvent(new PlayerRankupEvent(plugin, player, rank));
48
  }
49
50
  public void sendRankupMessages(Player player, RankElement<Rank> rank) {
51
    plugin.getMessage(rank.getRank(), Message.SUCCESS_PUBLIC)
52
        .failIfEmpty()
53
        .replacePlayer(player)
54
        .replaceOldRank(rank.getRank())
55
        .replaceRank(rank.getNext().getRank())
56 1 1. sendRankupMessages : removed call to sh/okx/rankup/messages/MessageBuilder::broadcast → KILLED
        .broadcast();
57
    plugin.getMessage(rank.getRank(), Message.SUCCESS_PRIVATE)
58
        .failIfEmpty()
59
        .replacePlayer(player)
60
        .replaceOldRank(rank.getRank())
61
        .replaceRank(rank.getNext().getRank())
62 1 1. sendRankupMessages : removed call to sh/okx/rankup/messages/MessageBuilder::send → KILLED
        .send(player);
63
  }
64
65
  public void doPrestige(Player player, RankElement<Prestige> prestige) {
66
    Prestige rank = prestige.getRank();
67
68 1 1. doPrestige : removed call to sh/okx/rankup/hook/GroupProvider::removeGroup → NO_COVERAGE
    permissions.removeGroup(player.getUniqueId(), rank.getFrom());
69 1 1. doPrestige : removed call to sh/okx/rankup/hook/GroupProvider::addGroup → NO_COVERAGE
    permissions.addGroup(player.getUniqueId(), rank.getTo());
70
71 1 1. doPrestige : negated conditional → NO_COVERAGE
    if (rank.getRank() != null) {
72 1 1. doPrestige : removed call to sh/okx/rankup/hook/GroupProvider::removeGroup → NO_COVERAGE
      permissions.removeGroup(player.getUniqueId(), rank.getRank());
73
    }
74 1 1. doPrestige : removed call to sh/okx/rankup/hook/GroupProvider::addGroup → NO_COVERAGE
    permissions.addGroup(player.getUniqueId(), prestige.getNext().getRank().getRank());
75
76 1 1. doPrestige : removed call to sh/okx/rankup/prestige/Prestige::runCommands → NO_COVERAGE
    rank.runCommands(player, prestige.getNext().getRank());
77
78 1 1. doPrestige : removed call to org/bukkit/plugin/PluginManager::callEvent → NO_COVERAGE
    Bukkit.getPluginManager().callEvent(new PlayerPrestigeEvent(plugin, player, prestige));
79
  }
80
81
  public void sendPrestigeMessages(Player player, RankElement<Prestige> prestige) {
82
    Objects.requireNonNull(prestige);
83
    Objects.requireNonNull(prestige.getNext());
84
85
    plugin.getMessage(prestige.getRank(), Message.PRESTIGE_SUCCESS_PUBLIC)
86
        .failIfEmpty()
87
        .replacePlayer(player)
88
        .replaceOldRank(prestige.getRank())
89
        .replaceRank(prestige.getNext().getRank())
90 1 1. sendPrestigeMessages : removed call to sh/okx/rankup/messages/MessageBuilder::broadcast → NO_COVERAGE
        .broadcast();
91
    plugin.getMessage(prestige.getRank(), Message.PRESTIGE_SUCCESS_PRIVATE)
92
        .failIfEmpty()
93
        .replacePlayer(player)
94
        .replaceOldRank(prestige.getRank())
95
        .replaceRank(prestige.getNext().getRank())
96 1 1. sendPrestigeMessages : removed call to sh/okx/rankup/messages/MessageBuilder::send → NO_COVERAGE
        .send(player);
97
  }
98
99
  private boolean checkCooldown(Player player, Rank rank) {
100 1 1. checkCooldown : negated conditional → KILLED
    if (cooldowns.containsKey(player)) {
101 1 1. checkCooldown : Replaced long subtraction with addition → NO_COVERAGE
      long time = System.currentTimeMillis() - cooldowns.get(player);
102
      // if time passed is less than the cooldown
103
      long cooldownSeconds = config.getInt("cooldown");
104 2 1. checkCooldown : Replaced long multiplication with division → NO_COVERAGE
2. checkCooldown : Replaced long subtraction with addition → NO_COVERAGE
      long timeLeft = (cooldownSeconds * 1000) - time;
105 2 1. checkCooldown : changed conditional boundary → NO_COVERAGE
2. checkCooldown : negated conditional → NO_COVERAGE
      if (timeLeft > 0) {
106 1 1. checkCooldown : Replaced float division with multiplication → NO_COVERAGE
        long secondsLeft = (long) Math.ceil(timeLeft / 1000f);
107
        plugin
108 2 1. checkCooldown : changed conditional boundary → NO_COVERAGE
2. checkCooldown : negated conditional → NO_COVERAGE
            .getMessage(rank, secondsLeft > 1 ? Message.COOLDOWN_PLURAL : Message.COOLDOWN_SINGULAR)
109
            .failIfEmpty()
110
            .replacePlayer(player)
111
            .replaceRank(rank)
112
            .replaceSeconds(cooldownSeconds, secondsLeft)
113 1 1. checkCooldown : removed call to sh/okx/rankup/messages/MessageBuilder::send → NO_COVERAGE
            .send(player);
114 1 1. checkCooldown : replaced boolean return with false for sh/okx/rankup/RankupHelper::checkCooldown → NO_COVERAGE
        return true;
115
      }
116
      // cooldown has expired so remove it
117
      cooldowns.remove(player);
118
    }
119 1 1. checkCooldown : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkCooldown → KILLED
    return false;
120
  }
121
122
  private void applyCooldown(Player player) {
123 2 1. applyCooldown : changed conditional boundary → SURVIVED
2. applyCooldown : negated conditional → SURVIVED
    if (config.getInt("cooldown") > 0) {
124
      cooldowns.put(player, System.currentTimeMillis());
125
    }
126
  }
127
128
  public void rankup(Player player) {
129 1 1. rankup : negated conditional → KILLED
    if (!checkRankup(player)) {
130
      return;
131
    }
132
133
    RankElement<Rank> rankElement = plugin.getRankups().getByPlayer(player);
134
    Rank rank = rankElement.getRank();
135 1 1. rankup : removed call to sh/okx/rankup/ranks/Rank::applyRequirements → KILLED
    rank.applyRequirements(player);
136 1 1. rankup : removed call to sh/okx/rankup/RankupHelper::applyCooldown → SURVIVED
    applyCooldown(player);
137
138 1 1. rankup : removed call to sh/okx/rankup/RankupHelper::doRankup → KILLED
    doRankup(player, rankElement);
139 1 1. rankup : removed call to sh/okx/rankup/RankupHelper::sendRankupMessages → KILLED
    sendRankupMessages(player, rankElement);
140
  }
141
142
  public boolean checkRankup(Player player) {
143 2 1. checkRankup : replaced boolean return with false for sh/okx/rankup/RankupHelper::checkRankup → KILLED
2. checkRankup : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkRankup → KILLED
    return checkRankup(player, true);
144
  }
145
146
  /**
147
   * Checks if a player can rankup, and if they can't, sends the player a message and returns false
148
   *
149
   * @param player the player to check if they can rankup
150
   * @return true if the player can rankup, false otherwise
151
   */
152
  public boolean checkRankup(Player player, boolean message) {
153
    Rankups rankups = plugin.getRankups();
154
    RankElement<Rank> rankElement = rankups.getByPlayer(player);
155 1 1. checkRankup : negated conditional → KILLED
    if (rankElement == null) { // check if in ladder
156 1 1. checkRankup : negated conditional → KILLED
      plugin.getMessage(Message.NOT_IN_LADDER)
157
          .failIf(!message)
158
          .replacePlayer(player)
159 1 1. checkRankup : removed call to sh/okx/rankup/messages/MessageBuilder::send → KILLED
          .send(player);
160 1 1. checkRankup : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkRankup → KILLED
      return false;
161
    }
162
    Rank rank = rankElement.getRank();
163 1 1. checkRankup : negated conditional → KILLED
    if (!rankElement.hasNext()) {
164
      Prestiges prestiges = plugin.getPrestiges();
165
      Message pMessage = Message.NO_RANKUP;
166 1 1. checkRankup : negated conditional → KILLED
      if (prestiges != null) {
167
        RankElement<Prestige> byPlayer = prestiges.getByPlayer(player);
168 2 1. checkRankup : negated conditional → NO_COVERAGE
2. checkRankup : negated conditional → KILLED
        if (byPlayer != null && byPlayer.hasNext()) {
169
          pMessage = Message.MUST_PRESTIGE;
170
        }
171
      }
172 1 1. checkRankup : negated conditional → KILLED
      plugin.getMessage(pMessage)
173
          .failIf(!message)
174
          .replacePlayer(player)
175
          .replaceRank(rankups.getTree().last().getRank())
176 1 1. checkRankup : removed call to sh/okx/rankup/messages/MessageBuilder::send → KILLED
          .send(player);
177 1 1. checkRankup : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkRankup → KILLED
      return false;
178 1 1. checkRankup : negated conditional → KILLED
    } else if (!rank.hasRequirements(player)) { // check if they can afford it
179 1 1. checkRankup : negated conditional → KILLED
      if (message) {
180
        plugin.getMessage(rank, Message.REQUIREMENTS_NOT_MET)
181
            .replacePlayer(player)
182
            .replaceOldRank(rank)
183
            .replaceRank(rankElement.getNext().getRank())
184 1 1. checkRankup : removed call to sh/okx/rankup/messages/MessageBuilder::send → KILLED
            .send(player);
185
      }
186 1 1. checkRankup : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkRankup → KILLED
      return false;
187 2 1. checkRankup : negated conditional → SURVIVED
2. checkRankup : negated conditional → KILLED
    } else if (message && checkCooldown(player, rank)) {
188 1 1. checkRankup : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkRankup → NO_COVERAGE
      return false;
189
    }
190
191 1 1. checkRankup : replaced boolean return with false for sh/okx/rankup/RankupHelper::checkRankup → KILLED
    return true;
192
  }
193
194
  public void prestige(Player player) {
195 1 1. prestige : negated conditional → NO_COVERAGE
    if (!checkPrestige(player)) {
196
      return;
197
    }
198
199
    RankElement<Prestige> rankElement = plugin.getPrestiges().getByPlayer(player);
200
    Prestige prestige = rankElement.getRank();
201 1 1. prestige : removed call to sh/okx/rankup/prestige/Prestige::applyRequirements → NO_COVERAGE
    prestige.applyRequirements(player);
202
203 1 1. prestige : removed call to sh/okx/rankup/RankupHelper::applyCooldown → NO_COVERAGE
    applyCooldown(player);
204 1 1. prestige : removed call to sh/okx/rankup/RankupHelper::doPrestige → NO_COVERAGE
    doPrestige(player, rankElement);
205 1 1. prestige : removed call to sh/okx/rankup/RankupHelper::sendPrestigeMessages → NO_COVERAGE
    sendPrestigeMessages(player, rankElement);
206
  }
207
208
  public boolean checkPrestige(Player player) {
209 2 1. checkPrestige : replaced boolean return with false for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE
2. checkPrestige : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE
    return checkPrestige(player, true);
210
  }
211
212
  public boolean checkPrestige(Player player, boolean message) {
213
    Prestiges prestiges = plugin.getPrestiges();
214
    RankElement<Prestige> prestigeElement = prestiges.getByPlayer(player);
215 1 1. checkPrestige : negated conditional → NO_COVERAGE
    if (prestigeElement == null
216 1 1. checkPrestige : negated conditional → NO_COVERAGE
        || !prestigeElement.getRank().isEligible(player)) { // check if in ladder
217 1 1. checkPrestige : negated conditional → NO_COVERAGE
      plugin.getMessage(Message.NOT_HIGH_ENOUGH)
218
          .failIf(!message)
219
          .replacePlayer(player)
220 1 1. checkPrestige : removed call to sh/okx/rankup/messages/MessageBuilder::send → NO_COVERAGE
          .send(player);
221 1 1. checkPrestige : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE
      return false;
222 1 1. checkPrestige : negated conditional → NO_COVERAGE
    } else if (!prestigeElement.hasNext()) { // check if they are at the highest rank
223 1 1. checkPrestige : negated conditional → NO_COVERAGE
      plugin.getMessage(prestigeElement.getRank(), Message.PRESTIGE_NO_PRESTIGE)
224
          .failIf(!message)
225
          .replacePlayer(player)
226
          .replaceRank(prestigeElement.getRank())
227 1 1. checkPrestige : removed call to sh/okx/rankup/messages/MessageBuilder::send → NO_COVERAGE
          .send(player);
228 1 1. checkPrestige : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE
      return false;
229 1 1. checkPrestige : negated conditional → NO_COVERAGE
    } else if (!prestigeElement.getRank().hasRequirements(player)) { // check if they can afford it
230 1 1. checkPrestige : negated conditional → NO_COVERAGE
      plugin.getMessage(prestigeElement.getRank(), Message.PRESTIGE_REQUIREMENTS_NOT_MET)
231
          .failIf(!message)
232
          .replacePlayer(player)
233
          .replaceOldRank(prestigeElement.getRank())
234
          .replaceRank(prestigeElement.getNext().getRank())
235 1 1. checkPrestige : removed call to sh/okx/rankup/messages/MessageBuilder::send → NO_COVERAGE
          .send(player);
236 1 1. checkPrestige : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE
      return false;
237 1 1. checkPrestige : negated conditional → NO_COVERAGE
    } else if (checkCooldown(player, prestigeElement.getRank())) {
238 1 1. checkPrestige : replaced boolean return with true for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE
      return false;
239
    }
240
241 1 1. checkPrestige : replaced boolean return with false for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE
    return true;
242
  }
243
}

Mutations

40

1.1
Location : doRankup
Killed by : none
negated conditional → SURVIVED

41

1.1
Location : doRankup
Killed by : none
removed call to sh/okx/rankup/hook/GroupProvider::removeGroup → SURVIVED

43

1.1
Location : doRankup
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRankup()]
removed call to sh/okx/rankup/hook/GroupProvider::addGroup → KILLED

45

1.1
Location : doRankup
Killed by : none
removed call to sh/okx/rankup/ranks/Rank::runCommands → SURVIVED

47

1.1
Location : doRankup
Killed by : none
removed call to org/bukkit/plugin/PluginManager::callEvent → SURVIVED

56

1.1
Location : sendRankupMessages
Killed by : sh.okx.rankup.messages.RankupPlaceholderTest.[engine:junit-jupiter]/[class:sh.okx.rankup.messages.RankupPlaceholderTest]/[method:testReceivesSuccessMessages()]
removed call to sh/okx/rankup/messages/MessageBuilder::broadcast → KILLED

62

1.1
Location : sendRankupMessages
Killed by : sh.okx.rankup.messages.RankupPlaceholderTest.[engine:junit-jupiter]/[class:sh.okx.rankup.messages.RankupPlaceholderTest]/[method:testReceivesSuccessMessages()]
removed call to sh/okx/rankup/messages/MessageBuilder::send → KILLED

68

1.1
Location : doPrestige
Killed by : none
removed call to sh/okx/rankup/hook/GroupProvider::removeGroup → NO_COVERAGE

69

1.1
Location : doPrestige
Killed by : none
removed call to sh/okx/rankup/hook/GroupProvider::addGroup → NO_COVERAGE

71

1.1
Location : doPrestige
Killed by : none
negated conditional → NO_COVERAGE

72

1.1
Location : doPrestige
Killed by : none
removed call to sh/okx/rankup/hook/GroupProvider::removeGroup → NO_COVERAGE

74

1.1
Location : doPrestige
Killed by : none
removed call to sh/okx/rankup/hook/GroupProvider::addGroup → NO_COVERAGE

76

1.1
Location : doPrestige
Killed by : none
removed call to sh/okx/rankup/prestige/Prestige::runCommands → NO_COVERAGE

78

1.1
Location : doPrestige
Killed by : none
removed call to org/bukkit/plugin/PluginManager::callEvent → NO_COVERAGE

90

1.1
Location : sendPrestigeMessages
Killed by : none
removed call to sh/okx/rankup/messages/MessageBuilder::broadcast → NO_COVERAGE

96

1.1
Location : sendPrestigeMessages
Killed by : none
removed call to sh/okx/rankup/messages/MessageBuilder::send → NO_COVERAGE

100

1.1
Location : checkCooldown
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRankup()]
negated conditional → KILLED

101

1.1
Location : checkCooldown
Killed by : none
Replaced long subtraction with addition → NO_COVERAGE

104

1.1
Location : checkCooldown
Killed by : none
Replaced long multiplication with division → NO_COVERAGE

2.2
Location : checkCooldown
Killed by : none
Replaced long subtraction with addition → NO_COVERAGE

105

1.1
Location : checkCooldown
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : checkCooldown
Killed by : none
negated conditional → NO_COVERAGE

106

1.1
Location : checkCooldown
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

108

1.1
Location : checkCooldown
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : checkCooldown
Killed by : none
negated conditional → NO_COVERAGE

113

1.1
Location : checkCooldown
Killed by : none
removed call to sh/okx/rankup/messages/MessageBuilder::send → NO_COVERAGE

114

1.1
Location : checkCooldown
Killed by : none
replaced boolean return with false for sh/okx/rankup/RankupHelper::checkCooldown → NO_COVERAGE

119

1.1
Location : checkCooldown
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRankup()]
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkCooldown → KILLED

123

1.1
Location : applyCooldown
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : applyCooldown
Killed by : none
negated conditional → SURVIVED

129

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

135

1.1
Location : rankup
Killed by : sh.okx.rankup.requirements.PrestigeRequirementsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.requirements.PrestigeRequirementsTest]/[method:testPrestigeRequirements()]
removed call to sh/okx/rankup/ranks/Rank::applyRequirements → KILLED

136

1.1
Location : rankup
Killed by : none
removed call to sh/okx/rankup/RankupHelper::applyCooldown → SURVIVED

138

1.1
Location : rankup
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRankup()]
removed call to sh/okx/rankup/RankupHelper::doRankup → KILLED

139

1.1
Location : rankup
Killed by : sh.okx.rankup.messages.RankupPlaceholderTest.[engine:junit-jupiter]/[class:sh.okx.rankup.messages.RankupPlaceholderTest]/[method:testReceivesSuccessMessages()]
removed call to sh/okx/rankup/RankupHelper::sendRankupMessages → KILLED

143

1.1
Location : checkRankup
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRankup()]
replaced boolean return with false for sh/okx/rankup/RankupHelper::checkRankup → KILLED

2.2
Location : checkRankup
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testNotInLadder()]
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkRankup → KILLED

155

1.1
Location : checkRankup
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testNotInLadder()]
negated conditional → KILLED

156

1.1
Location : checkRankup
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testNotInLadder()]
negated conditional → KILLED

159

1.1
Location : checkRankup
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testNotInLadder()]
removed call to sh/okx/rankup/messages/MessageBuilder::send → KILLED

160

1.1
Location : checkRankup
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testNotInLadder()]
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkRankup → KILLED

163

1.1
Location : checkRankup
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRequirementsNotMet()]
negated conditional → KILLED

166

1.1
Location : checkRankup
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testLastRank()]
negated conditional → KILLED

168

1.1
Location : checkRankup
Killed by : sh.okx.rankup.prestige.BrokenPrestigeTest.[engine:junit-jupiter]/[class:sh.okx.rankup.prestige.BrokenPrestigeTest]/[method:testPrestige()]
negated conditional → KILLED

2.2
Location : checkRankup
Killed by : none
negated conditional → NO_COVERAGE

172

1.1
Location : checkRankup
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testLastRank()]
negated conditional → KILLED

176

1.1
Location : checkRankup
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testLastRank()]
removed call to sh/okx/rankup/messages/MessageBuilder::send → KILLED

177

1.1
Location : checkRankup
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testLastRank()]
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkRankup → KILLED

178

1.1
Location : checkRankup
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRequirementsNotMet()]
negated conditional → KILLED

179

1.1
Location : checkRankup
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRequirementsNotMet()]
negated conditional → KILLED

184

1.1
Location : checkRankup
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRequirementsNotMet()]
removed call to sh/okx/rankup/messages/MessageBuilder::send → KILLED

186

1.1
Location : checkRankup
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testMoneyRequirement()]
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkRankup → KILLED

187

1.1
Location : checkRankup
Killed by : none
negated conditional → SURVIVED

2.2
Location : checkRankup
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRankup()]
negated conditional → KILLED

188

1.1
Location : checkRankup
Killed by : none
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkRankup → NO_COVERAGE

191

1.1
Location : checkRankup
Killed by : sh.okx.rankup.toml.TomlTest.[engine:junit-jupiter]/[class:sh.okx.rankup.toml.TomlTest]/[method:testRankup()]
replaced boolean return with false for sh/okx/rankup/RankupHelper::checkRankup → KILLED

195

1.1
Location : prestige
Killed by : none
negated conditional → NO_COVERAGE

201

1.1
Location : prestige
Killed by : none
removed call to sh/okx/rankup/prestige/Prestige::applyRequirements → NO_COVERAGE

203

1.1
Location : prestige
Killed by : none
removed call to sh/okx/rankup/RankupHelper::applyCooldown → NO_COVERAGE

204

1.1
Location : prestige
Killed by : none
removed call to sh/okx/rankup/RankupHelper::doPrestige → NO_COVERAGE

205

1.1
Location : prestige
Killed by : none
removed call to sh/okx/rankup/RankupHelper::sendPrestigeMessages → NO_COVERAGE

209

1.1
Location : checkPrestige
Killed by : none
replaced boolean return with false for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE

2.2
Location : checkPrestige
Killed by : none
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE

215

1.1
Location : checkPrestige
Killed by : none
negated conditional → NO_COVERAGE

216

1.1
Location : checkPrestige
Killed by : none
negated conditional → NO_COVERAGE

217

1.1
Location : checkPrestige
Killed by : none
negated conditional → NO_COVERAGE

220

1.1
Location : checkPrestige
Killed by : none
removed call to sh/okx/rankup/messages/MessageBuilder::send → NO_COVERAGE

221

1.1
Location : checkPrestige
Killed by : none
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE

222

1.1
Location : checkPrestige
Killed by : none
negated conditional → NO_COVERAGE

223

1.1
Location : checkPrestige
Killed by : none
negated conditional → NO_COVERAGE

227

1.1
Location : checkPrestige
Killed by : none
removed call to sh/okx/rankup/messages/MessageBuilder::send → NO_COVERAGE

228

1.1
Location : checkPrestige
Killed by : none
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE

229

1.1
Location : checkPrestige
Killed by : none
negated conditional → NO_COVERAGE

230

1.1
Location : checkPrestige
Killed by : none
negated conditional → NO_COVERAGE

235

1.1
Location : checkPrestige
Killed by : none
removed call to sh/okx/rankup/messages/MessageBuilder::send → NO_COVERAGE

236

1.1
Location : checkPrestige
Killed by : none
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE

237

1.1
Location : checkPrestige
Killed by : none
negated conditional → NO_COVERAGE

238

1.1
Location : checkPrestige
Killed by : none
replaced boolean return with true for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE

241

1.1
Location : checkPrestige
Killed by : none
replaced boolean return with false for sh/okx/rankup/RankupHelper::checkPrestige → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.7.0