SystemInfoController.java

1
package edu.ucsb.cs156.gauchoride.controllers;
2
3
import io.swagger.v3.oas.annotations.tags.Tag;
4
import io.swagger.v3.oas.annotations.Operation;
5
6
import org.springframework.beans.factory.annotation.Autowired;
7
import org.springframework.web.bind.annotation.GetMapping;
8
import org.springframework.web.bind.annotation.RequestMapping;
9
import org.springframework.web.bind.annotation.RestController;
10
11
import edu.ucsb.cs156.gauchoride.models.SystemInfo;
12
import edu.ucsb.cs156.gauchoride.services.SystemInfoService;
13
14
/**
15
 * SystemInfoController returns information about the application; typically
16
 * the values of environment variables that may be needed by the frontend.
17
 */
18
19
@Tag(name = "System Information")
20
@RequestMapping("/api/systemInfo")
21
@RestController
22
public class SystemInfoController extends ApiController {
23
24
    @Autowired
25
    private SystemInfoService systemInfoService;
26
27
    @Operation(summary = "Get global information about the application")
28
    @GetMapping("")
29
    public SystemInfo getSystemInfo() {
30 1 1. getSystemInfo : replaced return value with null for edu/ucsb/cs156/gauchoride/controllers/SystemInfoController::getSystemInfo → KILLED
        return systemInfoService.getSystemInfo();
31
    }
32
33
}

Mutations

30

1.1
Location : getSystemInfo
Killed by : edu.ucsb.cs156.gauchoride.controllers.SystemInfoControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.gauchoride.controllers.SystemInfoControllerTests]/[method:systemInfo__returns_expected()]
replaced return value with null for edu/ucsb/cs156/gauchoride/controllers/SystemInfoController::getSystemInfo → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3