SystemInfoController.java

1
package edu.ucsb.cs.scaffold.controller;
2
3
import edu.ucsb.cs.scaffold.enums.School;
4
import edu.ucsb.cs.scaffold.model.SystemInfo;
5
import edu.ucsb.cs.scaffold.services.SystemInfoService;
6
import io.swagger.v3.oas.annotations.Operation;
7
import io.swagger.v3.oas.annotations.tags.Tag;
8
import java.util.List;
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 = "System Information")
15
@RequestMapping("/api/systemInfo")
16
@RestController
17
public class SystemInfoController {
18
19
  @Autowired private SystemInfoService systemInfoService;
20
21
  @Operation(summary = "Get global information about the application")
22
  @GetMapping("")
23
  public SystemInfo getSystemInfo() {
24 1 1. getSystemInfo : replaced return value with null for edu/ucsb/cs/scaffold/controller/SystemInfoController::getSystemInfo → KILLED
    return systemInfoService.getSystemInfo();
25
  }
26
27
  @Operation(summary = "Get available schools")
28
  @GetMapping("/schools")
29
  public List<School> getSchools() {
30 1 1. getSchools : replaced return value with Collections.emptyList for edu/ucsb/cs/scaffold/controller/SystemInfoController::getSchools → KILLED
    return List.of(School.values());
31
  }
32
}

Mutations

24

1.1
Location : getSystemInfo
Killed by : edu.ucsb.cs.scaffold.controller.SystemInfoControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs.scaffold.controller.SystemInfoControllerTests]/[method:systemInfo__admin_logged_in()]
replaced return value with null for edu/ucsb/cs/scaffold/controller/SystemInfoController::getSystemInfo → KILLED

30

1.1
Location : getSchools
Killed by : edu.ucsb.cs.scaffold.controller.SystemInfoControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs.scaffold.controller.SystemInfoControllerTests]/[method:school_list_matches()]
replaced return value with Collections.emptyList for edu/ucsb/cs/scaffold/controller/SystemInfoController::getSchools → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.0