CommonsPlus.java

1
package edu.ucsb.cs156.happiercows.entities;
2
3
import lombok.Data;
4
5
import com.fasterxml.jackson.annotation.JsonGetter;
6
7
import edu.ucsb.cs156.happiercows.repositories.CommonsRepository;
8
import lombok.AllArgsConstructor;
9
import lombok.NoArgsConstructor;
10
import lombok.Builder;
11
12
@Data
13
@AllArgsConstructor
14
@NoArgsConstructor
15
@Builder
16
public class CommonsPlus {
17
18
    private Commons commons;
19
    private CommonsRepository commonsRepository;
20
    private Integer totalCows;
21
    private Integer totalUsers;
22
    private Integer effectiveCapacity;
23
24
    public CommonsPlus(Commons commons, CommonsRepository commonsRepository){
25
        this.commons = commons;
26
        this.commonsRepository = commonsRepository;
27
        this.effectiveCapacity = Commons.computeEffectiveCapacity(commons, commonsRepository);
28
    }
29
    
30
    @JsonGetter("effectiveCapacity")
31
    public int getEffectiveCapacity(){
32 1 1. getEffectiveCapacity : replaced int return with 0 for edu/ucsb/cs156/happiercows/entities/CommonsPlus::getEffectiveCapacity → KILLED
        return this.effectiveCapacity;
33
    }
34
}

Mutations

32

1.1
Location : getEffectiveCapacity
Killed by : edu.ucsb.cs156.happiercows.entities.CommonsPlusTest.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.entities.CommonsPlusTest]/[method:testGetEffectiveCapacity()]
replaced int return with 0 for edu/ucsb/cs156/happiercows/entities/CommonsPlus::getEffectiveCapacity → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3