DiningCommonsController.java

1
package edu.ucsb.cs156.dining.controllers;
2
3
import edu.ucsb.cs156.dining.models.DiningCommon;
4
import edu.ucsb.cs156.dining.services.DiningCommonsService;
5
import io.swagger.v3.oas.annotations.Operation;
6
import io.swagger.v3.oas.annotations.tags.Tag;
7
import java.util.List;
8
import lombok.extern.slf4j.Slf4j;
9
import org.springframework.beans.factory.annotation.Autowired;
10
import org.springframework.web.bind.annotation.GetMapping;
11
import org.springframework.web.bind.annotation.RequestMapping;
12
import org.springframework.web.bind.annotation.RestController;
13
14
@Tag(name = "DiningCommonsController")
15
@RestController
16
@RequestMapping("/api/public")
17
@Slf4j
18
public class DiningCommonsController extends ApiController {
19
20
  @Autowired
21
  private DiningCommonsService diningCommonsService;
22
23
  @Operation(summary = "Get all dining commons")
24
  @GetMapping(value = "/diningcommons/all", produces = "application/json")
25
  public List<DiningCommon> getAllDiningCommons() throws Exception{
26 1 1. getAllDiningCommons : replaced return value with Collections.emptyList for edu/ucsb/cs156/dining/controllers/DiningCommonsController::getAllDiningCommons → KILLED
      return diningCommonsService.getAllDiningCommons();
27
  }
28
}

Mutations

26

1.1
Location : getAllDiningCommons
Killed by : edu.ucsb.cs156.dining.controllers.DiningCommonsControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.dining.controllers.DiningCommonsControllerTests]/[method:test_getAllDiningCommons()]
replaced return value with Collections.emptyList for edu/ucsb/cs156/dining/controllers/DiningCommonsController::getAllDiningCommons → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.0