< Summary - Estud

Information
Class: Estud.Back.Features.Students.GetStudent.GetStudentController
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Students/GetStudent/GetStudentController.cs
Tag: 114_29044117136
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 20
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
Get()100%11100%

File(s)

/home/runner/work/syki/syki/Back/Features/Students/GetStudent/GetStudentController.cs

#LineLine coverage
 1namespace Estud.Back.Features.Students.GetStudent;
 2
 3[ApiController, Authorize(Policies.GetStudent)]
 44public class GetStudentController(GetStudentService service) : ControllerBase
 5{
 6    /// <summary>Buscar aluno</summary>
 7    /// <remarks>Retorna os dados de um aluno, incluindo a oferta de curso atual.</remarks>
 8    [HttpGet("students/{studentId:int}")]
 9    [SwaggerResponseExample(200, typeof(ResponseExamples))]
 10    [SwaggerResponseExample(400, typeof(ErrorsExamples))]
 11    public async Task<IActionResult> Get([FromRoute] int studentId)
 12    {
 413        var result = await service.Get(studentId);
 414        return result.Match<IActionResult>(Ok, BadRequest);
 415    }
 16}
 17
 18internal class RequestExamples : ExamplesProvider<GetStudentOut>;
 19internal class ResponseExamples : ExamplesProvider<GetStudentOut>;
 20internal class ErrorsExamples : ErrorExamplesProvider<StudentNotFound>;