< Summary - Syki

Information
Class: Syki.Back.Features.Teacher.GetClassNotesRemainingWeights.GetClassNotesRemainingWeightsService
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Teacher/GetClassNotesRemainingWeights/GetClassNotesRemainingWeightsService.cs
Tag: 4_16869239191
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 16
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
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()50%22100%

File(s)

/home/runner/work/syki/syki/Back/Features/Teacher/GetClassNotesRemainingWeights/GetClassNotesRemainingWeightsService.cs

#LineLine coverage
 1namespace Syki.Back.Features.Teacher.GetClassNotesRemainingWeights;
 2
 83public class GetClassNotesRemainingWeightsService(SykiDbContext ctx) : ITeacherService
 4{
 5    public async Task<OneOf<List<ClassNoteRemainingWeightsOut>, SykiError>> Get(Guid institutionId, Guid userId, Guid id
 6    {
 87        var @class = await ctx.Classes.AsNoTracking()
 88            .Include(t => t.Activities)
 89            .Where(t => t.InstitutionId == institutionId && t.TeacherId == userId && t.Id == id)
 810            .FirstOrDefaultAsync();
 11
 812        if (@class == null) return new ClassNotFound();
 13
 814        return @class.GetNotesRemainingWeights();
 815    }
 16}