< Summary - Estud

Information
Class: Estud.Back.Features.Notifications.GetUnreadNotificationsCount.GetUnreadNotificationsCountService
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Notifications/GetUnreadNotificationsCount/GetUnreadNotificationsCountService.cs
Tag: 114_29044117136
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 12
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%
Get()100%11100%

File(s)

/home/runner/work/syki/syki/Back/Features/Notifications/GetUnreadNotificationsCount/GetUnreadNotificationsCountService.cs

#LineLine coverage
 1namespace Estud.Back.Features.Notifications.GetUnreadNotificationsCount;
 2
 83public class GetUnreadNotificationsCountService(EstudDbContext ctx) : IEstudService
 4{
 5    public async Task<GetUnreadNotificationsCountOut> Get()
 6    {
 87        var count = await ctx.UserNotifications.CountAsync(x =>
 88            x.UserId == ctx.RequestUser.Id && x.ViewedAt == null);
 9
 810        return new GetUnreadNotificationsCountOut { Count = count };
 811    }
 12}