CommonStatsJobFactory.java

1
package edu.ucsb.cs156.happiercows.jobs;
2
3
import org.springframework.beans.factory.annotation.Autowired;
4
import org.springframework.stereotype.Service;
5
6
import edu.ucsb.cs156.happiercows.repositories.CommonsRepository;
7
import edu.ucsb.cs156.happiercows.repositories.CommonStatsRepository;
8
import edu.ucsb.cs156.happiercows.repositories.UserCommonsRepository;
9
import edu.ucsb.cs156.happiercows.repositories.UserRepository;
10
import edu.ucsb.cs156.happiercows.services.AverageCowHealthService;
11
import edu.ucsb.cs156.happiercows.services.jobs.JobContextConsumer;
12
13
@Service
14
public class CommonStatsJobFactory {
15
16
    @Autowired
17
    private AverageCowHealthService averageCowHealthService;
18
19
    @Autowired
20
    private CommonStatsRepository commonStatsRepository;
21
22
    @Autowired
23
    private UserCommonsRepository userCommonsRepository;
24
25
    @Autowired
26
    private CommonsRepository commonsRepository;
27
28
    public JobContextConsumer create() {
29 1 1. create : replaced return value with null for edu/ucsb/cs156/happiercows/jobs/CommonStatsJobFactory::create → KILLED
        return new CommonStatsJob(averageCowHealthService, commonStatsRepository, userCommonsRepository, commonsRepository);
30
    }
31
    
32
}

Mutations

29

1.1
Location : create
Killed by : edu.ucsb.cs156.happiercows.jobs.CommonStatsJobFactoryTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.jobs.CommonStatsJobFactoryTests]/[method:test_create()]
replaced return value with null for edu/ucsb/cs156/happiercows/jobs/CommonStatsJobFactory::create → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3