SystemInfoController.java

1
package edu.ucsb.cs156.happiercows.controllers;
2
3
import edu.ucsb.cs156.happiercows.models.SystemInfo;
4
import edu.ucsb.cs156.happiercows.services.SystemInfoService;
5
import io.swagger.v3.oas.annotations.tags.Tag;
6
import io.swagger.v3.oas.annotations.Operation;
7
8
import org.springframework.beans.factory.annotation.Autowired;
9
import org.springframework.security.access.prepost.PreAuthorize;
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 extends ApiController {
18
19
    @Autowired
20
    private SystemInfoService systemInfoService;
21
22
    @Operation(summary = "Get global information about the application")
23
    @GetMapping("")
24
    public SystemInfo getSystemInfo() {
25 1 1. getSystemInfo : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/SystemInfoController::getSystemInfo → KILLED
        return systemInfoService.getSystemInfo();
26
    }
27
28
}

Mutations

25

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

Active mutators

Tests examined


Report generated by PIT 1.7.3