PersonalSchedulesController.java

1
package edu.ucsb.cs156.courses.controllers;
2
3
import edu.ucsb.cs156.courses.entities.PSCourse;
4
import edu.ucsb.cs156.courses.entities.PersonalSchedule;
5
import edu.ucsb.cs156.courses.entities.User;
6
import edu.ucsb.cs156.courses.errors.EntityNotFoundException;
7
import edu.ucsb.cs156.courses.models.CurrentUser;
8
import edu.ucsb.cs156.courses.repositories.PSCourseRepository;
9
import edu.ucsb.cs156.courses.repositories.PersonalScheduleRepository;
10
import io.swagger.v3.oas.annotations.Operation;
11
import io.swagger.v3.oas.annotations.Parameter;
12
import io.swagger.v3.oas.annotations.tags.Tag;
13
import java.util.Optional;
14
import javax.validation.Valid;
15
import lombok.extern.slf4j.Slf4j;
16
import org.springframework.beans.factory.annotation.Autowired;
17
import org.springframework.security.access.prepost.PreAuthorize;
18
import org.springframework.web.bind.annotation.DeleteMapping;
19
import org.springframework.web.bind.annotation.GetMapping;
20
import org.springframework.web.bind.annotation.PostMapping;
21
import org.springframework.web.bind.annotation.PutMapping;
22
import org.springframework.web.bind.annotation.RequestBody;
23
import org.springframework.web.bind.annotation.RequestMapping;
24
import org.springframework.web.bind.annotation.RequestParam;
25
import org.springframework.web.bind.annotation.RestController;
26
27
@Tag(name = "PersonalSchedules")
28
@RequestMapping("/api/personalschedules")
29
@RestController
30
@Slf4j
31
public class PersonalSchedulesController extends ApiController {
32
33
  @Autowired PersonalScheduleRepository personalscheduleRepository;
34
  @Autowired PSCourseRepository coursesRepository;
35
36
  @Operation(summary = "List all personal schedules")
37
  @PreAuthorize("hasRole('ROLE_ADMIN')")
38
  @GetMapping("/admin/all")
39
  public Iterable<PersonalSchedule> allUsersSchedules() {
40
    Iterable<PersonalSchedule> personalschedules = personalscheduleRepository.findAll();
41 1 1. allUsersSchedules : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::allUsersSchedules → KILLED
    return personalschedules;
42
  }
43
44
  @Operation(summary = "List this user's personal schedules")
45
  @PreAuthorize("hasRole('ROLE_USER')")
46
  @GetMapping("/all")
47
  public Iterable<PersonalSchedule> thisUsersSchedules() {
48
    CurrentUser currentUser = getCurrentUser();
49
    Iterable<PersonalSchedule> personalschedules =
50
        personalscheduleRepository.findAllByUserId(currentUser.getUser().getId());
51 1 1. thisUsersSchedules : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::thisUsersSchedules → KILLED
    return personalschedules;
52
  }
53
54
  @Operation(summary = "Get a single personal schedule (if it belongs to current user)")
55
  @PreAuthorize("hasRole('ROLE_USER')")
56
  @GetMapping("")
57
  public PersonalSchedule getScheduleById(@Parameter(name = "id") @RequestParam Long id) {
58
    User currentUser = getCurrentUser().getUser();
59
    PersonalSchedule personalschedule =
60
        personalscheduleRepository
61
            .findByIdAndUser(id, currentUser)
62 1 1. lambda$getScheduleById$0 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$getScheduleById$0 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, id));
63
64 1 1. getScheduleById : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::getScheduleById → KILLED
    return personalschedule;
65
  }
66
67
  @Operation(summary = "Get a single personal schedule (no matter who it belongs to, admin only)")
68
  @PreAuthorize("hasRole('ROLE_ADMIN')")
69
  @GetMapping("/admin")
70
  public PersonalSchedule getScheduleById_admin(@Parameter(name = "id") @RequestParam Long id) {
71
    PersonalSchedule personalschedule =
72
        personalscheduleRepository
73
            .findById(id)
74 1 1. lambda$getScheduleById_admin$1 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$getScheduleById_admin$1 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, id));
75
76 1 1. getScheduleById_admin : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::getScheduleById_admin → KILLED
    return personalschedule;
77
  }
78
79
  @Operation(summary = "Create a new personal schedule")
80
  @PreAuthorize("hasRole('ROLE_USER')")
81
  @PostMapping("/post")
82
  public PersonalSchedule postSchedule(
83
      @Parameter(name = "name") @RequestParam String name,
84
      @Parameter(name = "description") @RequestParam String description,
85
      @Parameter(name = "quarter") @RequestParam String quarter) {
86
    CurrentUser currentUser = getCurrentUser();
87
    log.info("currentUser={}", currentUser);
88
89
    // Checks length of name parameter (length should be 15 chars or less, nonzero)
90 2 1. postSchedule : changed conditional boundary → KILLED
2. postSchedule : negated conditional → KILLED
    if (name.length() > 15) {
91
      throw new IllegalArgumentException("name parameter restricted to 15 chars or less");
92
    }
93
94
    PersonalSchedule personalschedule = new PersonalSchedule();
95 1 1. postSchedule : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setUser → KILLED
    personalschedule.setUser(currentUser.getUser());
96 1 1. postSchedule : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setName → KILLED
    personalschedule.setName(name);
97 1 1. postSchedule : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setDescription → KILLED
    personalschedule.setDescription(description);
98 1 1. postSchedule : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setQuarter → KILLED
    personalschedule.setQuarter(quarter);
99
100
    Optional<PersonalSchedule> existCheck =
101
        personalscheduleRepository.findByUserAndNameAndQuarter(
102
            currentUser.getUser(), name, quarter);
103 1 1. postSchedule : negated conditional → KILLED
    if (existCheck.isPresent()) {
104
      throw new IllegalArgumentException(
105
          "A personal schedule with that name already exists in that quarter");
106
    }
107
    PersonalSchedule savedPersonalSchedule = personalscheduleRepository.save(personalschedule);
108 1 1. postSchedule : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::postSchedule → KILLED
    return savedPersonalSchedule;
109
  }
110
111
  @Operation(summary = "Delete a personal schedule owned by this user")
112
  @PreAuthorize("hasRole('ROLE_USER')")
113
  @DeleteMapping("")
114
  public Object deleteSchedule(@Parameter(name = "id") @RequestParam Long id) {
115
    User currentUser = getCurrentUser().getUser();
116
    PersonalSchedule personalschedule =
117
        personalscheduleRepository
118
            .findByIdAndUser(id, currentUser)
119 1 1. lambda$deleteSchedule$2 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$deleteSchedule$2 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, id));
120
121 1 1. deleteSchedule : removed call to edu/ucsb/cs156/courses/repositories/PersonalScheduleRepository::delete → KILLED
    personalscheduleRepository.delete(personalschedule);
122
123
    Iterable<PSCourse> coursesToDelete = coursesRepository.findAllByPsId(id);
124
    for (PSCourse course : coursesToDelete) {
125 1 1. deleteSchedule : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED
      coursesRepository.delete(course);
126
    }
127
128 1 1. deleteSchedule : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::deleteSchedule → KILLED
    return genericMessage("PersonalSchedule with id %s deleted".formatted(id));
129
  }
130
131
  @Operation(summary = "Delete another user's personal schedule")
132
  @PreAuthorize("hasRole('ROLE_ADMIN')")
133
  @DeleteMapping("/admin")
134
  public Object deleteSchedule_Admin(@Parameter(name = "id") @RequestParam Long id) {
135
    PersonalSchedule personalschedule =
136
        personalscheduleRepository
137
            .findById(id)
138 1 1. lambda$deleteSchedule_Admin$3 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$deleteSchedule_Admin$3 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, id));
139
140 1 1. deleteSchedule_Admin : removed call to edu/ucsb/cs156/courses/repositories/PersonalScheduleRepository::delete → KILLED
    personalscheduleRepository.delete(personalschedule);
141
142
    Iterable<PSCourse> coursesToDelete = coursesRepository.findAllByPsId(id);
143
    for (PSCourse course : coursesToDelete) {
144 1 1. deleteSchedule_Admin : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED
      coursesRepository.delete(course);
145
    }
146
147 1 1. deleteSchedule_Admin : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::deleteSchedule_Admin → KILLED
    return genericMessage("PersonalSchedule with id %s deleted".formatted(id));
148
  }
149
150
  @Operation(summary = "Update a single personal schedule (if it belongs to current user)")
151
  @PreAuthorize("hasRole('ROLE_USER')")
152
  @PutMapping("")
153
  public PersonalSchedule putScheduleById(
154
      @Parameter(name = "id") @RequestParam Long id,
155
      @RequestBody @Valid PersonalSchedule incomingSchedule) {
156
    User currentUser = getCurrentUser().getUser();
157
    PersonalSchedule personalschedule =
158
        personalscheduleRepository
159
            .findByIdAndUser(id, currentUser)
160 1 1. lambda$putScheduleById$4 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$putScheduleById$4 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, id));
161
162 1 1. putScheduleById : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setName → KILLED
    personalschedule.setName(incomingSchedule.getName());
163 1 1. putScheduleById : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setDescription → KILLED
    personalschedule.setDescription(incomingSchedule.getDescription());
164 1 1. putScheduleById : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setQuarter → KILLED
    personalschedule.setQuarter(incomingSchedule.getQuarter());
165
166
    personalscheduleRepository.save(personalschedule);
167
168 1 1. putScheduleById : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::putScheduleById → KILLED
    return personalschedule;
169
  }
170
171
  @Operation(
172
      summary =
173
          "Update a single Schedule (regardless of ownership, admin only, can't change ownership)")
174
  @PreAuthorize("hasRole('ROLE_ADMIN')")
175
  @PutMapping("/admin")
176
  public PersonalSchedule putScheduleById_admin(
177
      @Parameter(name = "id") @RequestParam Long id,
178
      @RequestBody @Valid PersonalSchedule incomingSchedule) {
179
    PersonalSchedule personalschedule =
180
        personalscheduleRepository
181
            .findById(id)
182 1 1. lambda$putScheduleById_admin$5 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$putScheduleById_admin$5 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, id));
183
184 1 1. putScheduleById_admin : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setName → KILLED
    personalschedule.setName(incomingSchedule.getName());
185 1 1. putScheduleById_admin : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setDescription → KILLED
    personalschedule.setDescription(incomingSchedule.getDescription());
186 1 1. putScheduleById_admin : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setQuarter → KILLED
    personalschedule.setQuarter(incomingSchedule.getQuarter());
187
188
    personalscheduleRepository.save(personalschedule);
189
190 1 1. putScheduleById_admin : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::putScheduleById_admin → KILLED
    return personalschedule;
191
  }
192
}

Mutations

41

1.1
Location : allUsersSchedules
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules_admin_all__admin_logged_in__returns_all_schedules()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::allUsersSchedules → KILLED

51

1.1
Location : thisUsersSchedules
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules_all__user_logged_in__returns_only_schedules_for_user()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::thisUsersSchedules → KILLED

62

1.1
Location : lambda$getScheduleById$0
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__search_for_schedules_that_belongs_to_another_user()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$getScheduleById$0 → KILLED

64

1.1
Location : getScheduleById
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__returns_a_schedules_that_exists()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::getScheduleById → KILLED

74

1.1
Location : lambda$getScheduleById_admin$1
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__search_for_schedule_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$getScheduleById_admin$1 → KILLED

76

1.1
Location : getScheduleById_admin
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__search_for_schedule_that_belongs_to_another_user()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::getScheduleById_admin → KILLED

90

1.1
Location : postSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__can_post_15_char_name()]
changed conditional boundary → KILLED

2.2
Location : postSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__cannot_post_long_name()]
negated conditional → KILLED

95

1.1
Location : postSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__can_post_15_char_name()]
removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setUser → KILLED

96

1.1
Location : postSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__can_post_15_char_name()]
removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setName → KILLED

97

1.1
Location : postSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__can_post_15_char_name()]
removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setDescription → KILLED

98

1.1
Location : postSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__can_post_15_char_name()]
removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setQuarter → KILLED

103

1.1
Location : postSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__can_post_15_char_name()]
negated conditional → KILLED

108

1.1
Location : postSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__can_post_15_char_name()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::postSchedule → KILLED

119

1.1
Location : lambda$deleteSchedule$2
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__cannot_delete_delete_belonging_to_another_user()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$deleteSchedule$2 → KILLED

121

1.1
Location : deleteSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__delete_schedule()]
removed call to edu/ucsb/cs156/courses/repositories/PersonalScheduleRepository::delete → KILLED

125

1.1
Location : deleteSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__delete_schedule()]
removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED

128

1.1
Location : deleteSchedule
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__delete_schedule()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::deleteSchedule → KILLED

138

1.1
Location : lambda$deleteSchedule_Admin$3
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__cannot_delete_schedule_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$deleteSchedule_Admin$3 → KILLED

140

1.1
Location : deleteSchedule_Admin
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__delete_schedule()]
removed call to edu/ucsb/cs156/courses/repositories/PersonalScheduleRepository::delete → KILLED

144

1.1
Location : deleteSchedule_Admin
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__delete_schedule()]
removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED

147

1.1
Location : deleteSchedule_Admin
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__delete_schedule()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::deleteSchedule_Admin → KILLED

160

1.1
Location : lambda$putScheduleById$4
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__cannot_put_schedule_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$putScheduleById$4 → KILLED

162

1.1
Location : putScheduleById
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__put_schedule()]
removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setName → KILLED

163

1.1
Location : putScheduleById
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__put_schedule()]
removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setDescription → KILLED

164

1.1
Location : putScheduleById
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__put_schedule()]
removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setQuarter → KILLED

168

1.1
Location : putScheduleById
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__user_logged_in__put_schedule()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::putScheduleById → KILLED

182

1.1
Location : lambda$putScheduleById_admin$5
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__cannot_put_schedule_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$putScheduleById_admin$5 → KILLED

184

1.1
Location : putScheduleById_admin
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__put_schedule()]
removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setName → KILLED

185

1.1
Location : putScheduleById_admin
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__put_schedule()]
removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setDescription → KILLED

186

1.1
Location : putScheduleById_admin
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__put_schedule()]
removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setQuarter → KILLED

190

1.1
Location : putScheduleById_admin
Killed by : edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PersonalSchedulesControllerTests]/[method:api_schedules__admin_logged_in__put_schedule()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::putScheduleById_admin → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3