< Summary - Syki

Information
Class: Syki.Back.Features.Teachers.GetTeacherPotentialCampi.GetTeacherPotentialCampiController
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Teachers/GetTeacherPotentialCampi/GetTeacherPotentialCampiController.cs
Tag: 97_27801654829
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 23
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/Teachers/GetTeacherPotentialCampi/GetTeacherPotentialCampiController.cs

#LineLine coverage
 1namespace Syki.Back.Features.Teachers.GetTeacherPotentialCampi;
 2
 3[ApiController, Authorize(Policies.GetTeacherPotentialCampi)]
 04public class GetTeacherPotentialCampiController(GetTeacherPotentialCampiService service) : ControllerBase
 5{
 6    /// <summary>
 7    /// Campus disponíveis para vincular ao professor
 8    /// </summary>
 9    /// <remarks>
 10    /// Retorna os campus ainda não vinculados ao professor, com suporte a pesquisa por nome.
 11    /// </remarks>
 12    [HttpGet("teachers/{id}/potential-campi")]
 13    [SwaggerResponseExample(200, typeof(ResponseExamples))]
 14    [SwaggerResponseExample(400, typeof(ErrorsExamples))]
 15    public async Task<IActionResult> Get(int id, [FromQuery] string? name)
 16    {
 017        var result = await service.Get(id, name);
 018        return result.Match<IActionResult>(Ok, BadRequest);
 019    }
 20}
 21
 22internal class ResponseExamples : ExamplesProvider<GetTeacherPotentialCampiOut>;
 23internal class ErrorsExamples : ErrorExamplesProvider<TeacherNotFound>;