Sunny.java

1
package com.takenoko.weather;
2
3
import com.takenoko.actions.Action;
4
import com.takenoko.engine.Board;
5
import com.takenoko.engine.BotManager;
6
import java.util.List;
7
8
/** Weather that adds a new action to the bot. */
9
public class Sunny extends Weather {
10
    @Override
11
    public List<Class<? extends Action>> apply(Board board, BotManager botManager) {
12 1 1. apply : removed call to com/takenoko/engine/Board::setWeather → KILLED
        board.setWeather(this);
13 1 1. apply : removed call to com/takenoko/engine/BotManager::addAction → KILLED
        botManager.addAction();
14
        return List.of();
15
    }
16
17
    @Override
18
    public void revert(Board board, BotManager botManager) {
19 1 1. revert : removed call to com/takenoko/engine/Board::resetWeather → KILLED
        board.resetWeather();
20
    }
21
22
    @Override
23
    public String toString() {
24 1 1. toString : replaced return value with "" for com/takenoko/weather/Sunny::toString → TIMED_OUT
        return "Sunny";
25
    }
26
}

Mutations

12

1.1
Location : apply
Killed by : com.takenoko.weather.SunnyTest.[engine:junit-jupiter]/[class:com.takenoko.weather.SunnyTest]/[nested-class:Apply]/[method:shouldApplyTheWeatherOnTheBoard()]
removed call to com/takenoko/engine/Board::setWeather → KILLED

13

1.1
Location : apply
Killed by : com.takenoko.weather.SunnyTest.[engine:junit-jupiter]/[class:com.takenoko.weather.SunnyTest]/[nested-class:Apply]/[method:shouldApplyTheWeatherOnTheBotManager()]
removed call to com/takenoko/engine/BotManager::addAction → KILLED

19

1.1
Location : revert
Killed by : com.takenoko.weather.SunnyTest.[engine:junit-jupiter]/[class:com.takenoko.weather.SunnyTest]/[nested-class:Revert]/[method:shouldRevertTheWeatherOnTheBoard()]
removed call to com/takenoko/engine/Board::resetWeather → KILLED

24

1.1
Location : toString
Killed by : none
replaced return value with "" for com/takenoko/weather/Sunny::toString → TIMED_OUT

Active mutators

Tests examined


Report generated by PIT 1.8.0