InventoryBambooStack.java

1
package com.takenoko.inventory;
2
3
import com.takenoko.layers.bamboo.BambooStack;
4
5
/** InventoryBambooStack represents the bamboos collected by the player */
6
public class InventoryBambooStack extends BambooStack {
7
8
    public InventoryBambooStack(int startingBamboo) {
9
        super(startingBamboo);
10
    }
11
12
    /** add 1 bamboo to inventory */
13
    public void collectBamboo() {
14 1 1. collectBamboo : removed call to com/takenoko/inventory/InventoryBambooStack::growBamboo → KILLED
        growBamboo();
15
    }
16
17
    public InventoryBambooStack(InventoryBambooStack bambooStack) {
18
        super(bambooStack.getBambooCount());
19
    }
20
21
    @Override
22
    public InventoryBambooStack copy() {
23 1 1. copy : replaced return value with null for com/takenoko/inventory/InventoryBambooStack::copy → KILLED
        return new InventoryBambooStack(this);
24
    }
25
26
    @Override
27
    public String toString() {
28 1 1. toString : replaced return value with "" for com/takenoko/inventory/InventoryBambooStack::toString → TIMED_OUT
        return "InventoryBambooStack{" + "bambooCount=" + bambooCount + '}';
29
    }
30
}

Mutations

14

1.1
Location : collectBamboo
Killed by : com.takenoko.inventory.InventoryBambooStackTest.[engine:junit-jupiter]/[class:com.takenoko.inventory.InventoryBambooStackTest]/[nested-class:TestAddBamboo]/[method:shouldAddABamboo()]
removed call to com/takenoko/inventory/InventoryBambooStack::growBamboo → KILLED

23

1.1
Location : copy
Killed by : com.takenoko.inventory.InventoryTest.[engine:junit-jupiter]/[class:com.takenoko.inventory.InventoryTest]/[nested-class:TestCopy]/[method:copy_shouldReturnCopyOfObject()]
replaced return value with null for com/takenoko/inventory/InventoryBambooStack::copy → KILLED

28

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

Active mutators

Tests examined


Report generated by PIT 1.8.0