SetCowHealthJobFactory.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.UserCommonsRepository;
8
import edu.ucsb.cs156.happiercows.repositories.UserRepository;
9
import edu.ucsb.cs156.happiercows.services.jobs.JobContextConsumer;
10
import lombok.extern.slf4j.Slf4j;
11
12
@Service
13
@Slf4j
14
public class SetCowHealthJobFactory  {
15
16
    @Autowired 
17
    private CommonsRepository commonsRepository;
18
  
19
    @Autowired
20
    private UserCommonsRepository userCommonsRepository;
21
22
    @Autowired
23
    private UserRepository userRepository;
24
25
    public JobContextConsumer create(Long commonsID, double health) {
26
        log.info("commonsRepository = " + commonsRepository);
27
        log.info("userCommonsRepository = " + userCommonsRepository);
28 1 1. create : replaced return value with null for edu/ucsb/cs156/happiercows/jobs/SetCowHealthJobFactory::create → KILLED
        return new SetCowHealthJob(commonsID, health, commonsRepository, userCommonsRepository, userRepository);
29
    }
30
}

Mutations

28

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

Active mutators

Tests examined


Report generated by PIT 1.7.3