< Summary

Information
Class: webapi.Controllers.HashTestController
Assembly: webapi
File(s): /home/runner/work/poc-request-body-to-hash/poc-request-body-to-hash/src/webapi/Controllers/HashTestController.cs
Tag: 11_2152250506
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 22
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Method coverage is only available for sponsors.

Upgrade to PRO version

Coverage History

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
Test()100%1100%

File(s)

/home/runner/work/poc-request-body-to-hash/poc-request-body-to-hash/src/webapi/Controllers/HashTestController.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Mvc;
 2using webapi.Dto;
 3using webapi.Filter;
 4
 5namespace webapi.Controllers;
 6
 7[ApiController]
 8[Route("[controller]")]
 9public class HashTestController : ControllerBase
 10{
 11    [HttpPost]
 12    [RequestHash]
 13    public async Task<ActionResult> Test([FromHeader] string? What,
 14                                         [FromBody] HelloDto hello)
 115    {
 116        return Ok(new
 117        {
 118            Body= hello,
 119            Hash= Request.Headers["HashSHA512"][0]
 120        });
 121    }
 22}

Methods/Properties

Test()