< Summary - Syki

Information
Class: Syki.Back.Features.Students.GetStudent.GetStudentController
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Students/GetStudent/GetStudentController.cs
Tag: 97_27801654829
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 20
Line coverage: 0%
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%210%
Get()100%210%

File(s)

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

#LineLine coverage
 1namespace Syki.Back.Features.Students.GetStudent;
 2
 3[ApiController, Authorize(Policies.GetStudent)]
 04public 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    {
 013        var result = await service.Get(studentId);
 014        return result.Match<IActionResult>(Ok, BadRequest);
 015    }
 16}
 17
 18internal class RequestExamples : ExamplesProvider<GetStudentOut>;
 19internal class ResponseExamples : ExamplesProvider<GetStudentOut>;
 20internal class ErrorsExamples : ErrorExamplesProvider<StudentNotFound>;