< Summary - Syki

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

File(s)

/home/runner/work/syki/syki/Back/Features/Academic/ReleaseClassesForEnrollment/ReleaseClassesForEnrollmentController.cs

#LineLine coverage
 1namespace Syki.Back.Features.Academic.ReleaseClassesForEnrollment;
 2
 3[ApiController, AuthAcademic]
 4[EnableRateLimiting("Medium")]
 1185public class ReleaseClassesForEnrollmentController(ReleaseClassesForEnrollmentService service) : ControllerBase
 6{
 7    /// <summary>
 8    /// Liberar turmas
 9    /// </summary>
 10    /// <remarks>
 11    /// Libera as turmas informadas para que os alunos possam se matricular.
 12    /// </remarks>
 13    [HttpPut("academic/classes/release-for-enrollment")]
 14    [SwaggerResponseExample(200, typeof(ResponseExamples))]
 15    [SwaggerResponseExample(400, typeof(ErrorsExamples))]
 16    public async Task<IActionResult> Release([FromBody] ReleaseClassesForEnrollmentIn data)
 17    {
 11818        var result = await service.Release(User.InstitutionId, data);
 11819        return result.Match<IActionResult>(Ok, BadRequest);
 11820    }
 21}
 22
 23internal class RequestExamples : ExamplesProvider<ReleaseClassesForEnrollmentIn>;
 24internal class ResponseExamples : ExamplesProvider<SuccessOut>;
 25internal class ErrorsExamples : ErrorExamplesProvider<
 26    EnrollmentPeriodNotFound,
 27    EnrollmentPeriodNotStarted,
 28    EnrollmentPeriodFinalized,
 29    AllClassesMustHaveOnPreEnrollmentStatus>;