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 psCourseRepository;
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
    // Delete all courses associated with this personal schedule
124
    Iterable<PSCourse> coursesToDelete = psCourseRepository.findAllByPsId(id);
125
    for (PSCourse course : coursesToDelete) {
126 1 1. deleteSchedule : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED
      psCourseRepository.delete(course);
127
    }
128
129 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));
130
  }
131
132
  @Operation(summary = "Delete another user's personal schedule")
133
  @PreAuthorize("hasRole('ROLE_ADMIN')")
134
  @DeleteMapping("/admin")
135
  public Object deleteSchedule_Admin(@Parameter(name = "id") @RequestParam Long id) {
136
    PersonalSchedule personalschedule =
137
        personalscheduleRepository
138
            .findById(id)
139 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));
140
141 1 1. deleteSchedule_Admin : removed call to edu/ucsb/cs156/courses/repositories/PersonalScheduleRepository::delete → KILLED
    personalscheduleRepository.delete(personalschedule);
142
143
    // Delete all courses associated with this personal schedule
144
    Iterable<PSCourse> coursesToDelete = psCourseRepository.findAllByPsId(id);
145
    for (PSCourse course : coursesToDelete) {
146 1 1. deleteSchedule_Admin : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED
      psCourseRepository.delete(course);
147
    }
148
149 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));
150
  }
151
152
  @Operation(summary = "Update a single personal schedule (if it belongs to current user)")
153
  @PreAuthorize("hasRole('ROLE_USER')")
154
  @PutMapping("")
155
  public PersonalSchedule putScheduleById(
156
      @Parameter(name = "id") @RequestParam Long id,
157
      @RequestBody @Valid PersonalSchedule incomingSchedule) {
158
    User currentUser = getCurrentUser().getUser();
159
    PersonalSchedule personalschedule =
160
        personalscheduleRepository
161
            .findByIdAndUser(id, currentUser)
162 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));
163
164 1 1. putScheduleById : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setName → KILLED
    personalschedule.setName(incomingSchedule.getName());
165 1 1. putScheduleById : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setDescription → KILLED
    personalschedule.setDescription(incomingSchedule.getDescription());
166 1 1. putScheduleById : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setQuarter → KILLED
    personalschedule.setQuarter(incomingSchedule.getQuarter());
167
168
    personalscheduleRepository.save(personalschedule);
169
170 1 1. putScheduleById : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::putScheduleById → KILLED
    return personalschedule;
171
  }
172
173
  @Operation(
174
      summary =
175
          "Update a single Schedule (regardless of ownership, admin only, can't change ownership)")
176
  @PreAuthorize("hasRole('ROLE_ADMIN')")
177
  @PutMapping("/admin")
178
  public PersonalSchedule putScheduleById_admin(
179
      @Parameter(name = "id") @RequestParam Long id,
180
      @RequestBody @Valid PersonalSchedule incomingSchedule) {
181
    PersonalSchedule personalschedule =
182
        personalscheduleRepository
183
            .findById(id)
184 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));
185
186 1 1. putScheduleById_admin : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setName → KILLED
    personalschedule.setName(incomingSchedule.getName());
187 1 1. putScheduleById_admin : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setDescription → KILLED
    personalschedule.setDescription(incomingSchedule.getDescription());
188 1 1. putScheduleById_admin : removed call to edu/ucsb/cs156/courses/entities/PersonalSchedule::setQuarter → KILLED
    personalschedule.setQuarter(incomingSchedule.getQuarter());
189
190
    personalscheduleRepository.save(personalschedule);
191
192 1 1. putScheduleById_admin : replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::putScheduleById_admin → KILLED
    return personalschedule;
193
  }
194
}

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_does_not_exist()]
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_post__user_logged_in()]
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_post__user_logged_in()]
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_post__user_logged_in()]
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_post__user_logged_in()]
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_post__user_logged_in()]
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_post__user_logged_in()]
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

126

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

129

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

139

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

141

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

146

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

149

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

162

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_for_another_user()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PersonalSchedulesController::lambda$putScheduleById$4 → 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::setName → KILLED

165

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

166

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

170

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

184

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

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::setName → KILLED

187

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

188

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

192

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