< Summary - Syki

Information
Class: Syki.Back.Features.Student.CreateStudentEnrollment.CreateStudentEnrollmentController
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Student/CreateStudentEnrollment/CreateStudentEnrollmentController.cs
Tag: 4_16869239191
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 22
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%
Create()100%11100%

File(s)

/home/runner/work/syki/syki/Back/Features/Student/CreateStudentEnrollment/CreateStudentEnrollmentController.cs

#LineLine coverage
 1namespace Syki.Back.Features.Student.CreateStudentEnrollment;
 2
 3[ApiController, AuthStudent]
 4[EnableRateLimiting("Medium")]
 945public class CreateStudentEnrollmentController(CreateStudentEnrollmentService service) : ControllerBase
 6{
 7    /// <summary>
 8    /// Realizar matrícula
 9    /// </summary>
 10    /// <remarks>
 11    /// Realiza a matrícula do aluno nas turmas informadas.
 12    /// </remarks>
 13    [HttpPost("student/enrollments")]
 14    [ProducesResponseType<EnrollmentClassOut>(200)]
 15    [ProducesResponseType<SykiError>(400)]
 16    public async Task<IActionResult> Create([FromBody] CreateStudentEnrollmentIn data)
 17    {
 9418        var result = await service.Create(User.InstitutionId, User.Id, User.CourseCurriculumId, data);
 19
 9420        return result.Match<IActionResult>(Ok, BadRequest);
 9421    }
 22}