InstantaneousRewardsController.java

1
package org.cardanofoundation.explorer.api.controller;
2
3
import jakarta.validation.Valid;
4
5
import lombok.RequiredArgsConstructor;
6
7
import org.springframework.http.ResponseEntity;
8
import org.springframework.validation.annotation.Validated;
9
import org.springframework.web.bind.annotation.GetMapping;
10
import org.springframework.web.bind.annotation.RequestMapping;
11
import org.springframework.web.bind.annotation.RestController;
12
13
import io.swagger.v3.oas.annotations.Operation;
14
import io.swagger.v3.oas.annotations.tags.Tag;
15
import org.springdoc.core.annotations.ParameterObject;
16
17
import org.cardanofoundation.explorer.api.config.LogMessage;
18
import org.cardanofoundation.explorer.api.model.response.BaseFilterResponse;
19
import org.cardanofoundation.explorer.api.model.response.InstantaneousRewardsResponse;
20
import org.cardanofoundation.explorer.api.service.InstantaneousRewardsService;
21
import org.cardanofoundation.explorer.common.validation.pagination.Pagination;
22
import org.cardanofoundation.explorer.common.validation.pagination.PaginationDefault;
23
import org.cardanofoundation.explorer.common.validation.pagination.PaginationValid;
24
25
@RestController
26
@RequestMapping("/api/v1/instantaneous-rewards")
27
@RequiredArgsConstructor
28
@Validated
29
@Tag(name = "instantaneous-rewards", description = "The instantaneous rewards APIs")
30
public class InstantaneousRewardsController {
31
32
  private final InstantaneousRewardsService instantaneousRewardsService;
33
34
  @GetMapping
35
  @LogMessage
36
  @Operation(
37
      summary = "Get list of instantaneous rewards",
38
      tags = {"instantaneous-rewards"})
39
  public ResponseEntity<BaseFilterResponse<InstantaneousRewardsResponse>> getInstantaneousRewards(
40
      @ParameterObject @PaginationValid @PaginationDefault(size = 20) @Valid
41
          Pagination pagination) {
42 1 1. getInstantaneousRewards : replaced return value with null for org/cardanofoundation/explorer/api/controller/InstantaneousRewardsController::getInstantaneousRewards → KILLED
    return ResponseEntity.ok(instantaneousRewardsService.getAll(pagination.toPageable()));
43
  }
44
}

Mutations

42

1.1
Location : getInstantaneousRewards
Killed by : org.cardanofoundation.explorer.api.controller.InstantaneousRewardsControllerTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.controller.InstantaneousRewardsControllerTest]/[method:testGetInstantaneousRewards()]
replaced return value with null for org/cardanofoundation/explorer/api/controller/InstantaneousRewardsController::getInstantaneousRewards → KILLED

Active mutators

Tests examined


Report generated by PIT 1.14.2