UserInfoController.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.security.access.prepost.PreAuthorize;
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.CurrentUser;
12
13
@Tag(name="Current User Information")
14
@RequestMapping("/api/currentUser")
15
@RestController
16
public class UserInfoController extends ApiController {
17
 
18
  @Operation(summary = "Get information about current user")
19
  @PreAuthorize("hasRole('ROLE_USER')")
20
  @GetMapping("")
21
  public CurrentUser getCurrentUser() {
22 1 1. getCurrentUser : replaced return value with null for edu/ucsb/cs156/gauchoride/controllers/UserInfoController::getCurrentUser → KILLED
    return super.getCurrentUser();
23
  }
24
}

Mutations

22

1.1
Location : getCurrentUser
Killed by : edu.ucsb.cs156.gauchoride.controllers.UserInfoControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.gauchoride.controllers.UserInfoControllerTests]/[method:currentUser__logged_in()]
replaced return value with null for edu/ucsb/cs156/gauchoride/controllers/UserInfoController::getCurrentUser → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3