InstructorReportJobSingleCommons.java

1
package edu.ucsb.cs156.happiercows.jobs;
2
3
4
import edu.ucsb.cs156.happiercows.entities.Report;
5
import edu.ucsb.cs156.happiercows.services.jobs.JobContext;
6
import edu.ucsb.cs156.happiercows.services.jobs.JobContextConsumer;
7
import edu.ucsb.cs156.happiercows.services.ReportService;
8
import lombok.AllArgsConstructor;
9
import lombok.Getter;
10
11
@AllArgsConstructor
12
public class InstructorReportJobSingleCommons implements JobContextConsumer {
13
14
    @Getter
15
    private long commonsId;
16
17
    @Getter
18
    private ReportService reportService;
19
    
20
    @Override
21
    public void accept(JobContext ctx) throws Exception {
22 1 1. accept : removed call to edu/ucsb/cs156/happiercows/services/jobs/JobContext::log → KILLED
        ctx.log("Producing instructor report for commons id: " + commonsId);
23
        Report report = reportService.createReport(commonsId);
24 1 1. accept : removed call to edu/ucsb/cs156/happiercows/services/jobs/JobContext::log → KILLED
        ctx.log(String.format("Instructor report %d for commons %s has been produced!", report.getId(), report.getName()));
25
    }
26
}

Mutations

22

1.1
Location : accept
Killed by : edu.ucsb.cs156.happiercows.jobs.InstructorReportJobSingleCommonsTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.jobs.InstructorReportJobSingleCommonsTests]/[method:test_log_output()]
removed call to edu/ucsb/cs156/happiercows/services/jobs/JobContext::log → KILLED

24

1.1
Location : accept
Killed by : edu.ucsb.cs156.happiercows.jobs.InstructorReportJobSingleCommonsTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.jobs.InstructorReportJobSingleCommonsTests]/[method:test_log_output()]
removed call to edu/ucsb/cs156/happiercows/services/jobs/JobContext::log → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3