< Summary

Information
Class: RoleRadar.Application.Reading.ApplicationOrderingExtensions
Assembly: RoleRadar.Application
File(s): /home/runner/work/roleradar/roleradar/src/RoleRadar.Application/Reading/ApplicationOrderingExtensions.cs
Line coverage
50%
Covered lines: 6
Uncovered lines: 6
Coverable lines: 12
Total lines: 27
Line coverage: 50%
Branch coverage
37%
Covered branches: 3
Total branches: 8
Branch coverage: 37.5%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
OrderByFirstResponse(...)100%22100%
ThenByFirstResponse(...)0%620%
OrderByLastEvent(...)50%22100%
ThenByLastEvent(...)0%620%

File(s)

/home/runner/work/roleradar/roleradar/src/RoleRadar.Application/Reading/ApplicationOrderingExtensions.cs

#LineLine coverage
 1namespace RoleRadar.Application.Reading;
 2
 3using System.Linq;
 4using RoleRadar.Application.Reading.Models;
 5
 6public static class ApplicationOrderingExtensions
 7{
 8    public static IOrderedQueryable<ApplicationReadModel> OrderByFirstResponse(this IQueryable<ApplicationReadModel> sou
 549        => descending
 5410            ? source.OrderByDescending(p => p.HasFirstResponse).ThenByDescending(p => p.FirstResponseAt)
 5411            : source.OrderByDescending(p => p.HasFirstResponse).ThenBy(p => p.FirstResponseAt);
 12
 13    public static IOrderedQueryable<ApplicationReadModel> ThenByFirstResponse(this IOrderedQueryable<ApplicationReadMode
 014        => descending
 015            ? source.ThenByDescending(p => p.HasFirstResponse).ThenByDescending(p => p.FirstResponseAt)
 016            : source.ThenByDescending(p => p.HasFirstResponse).ThenBy(p => p.FirstResponseAt);
 17
 18    public static IOrderedQueryable<ApplicationReadModel> OrderByLastEvent(this IQueryable<ApplicationReadModel> source,
 2819        => descending
 2820            ? source.OrderByDescending(p => p.HasLastEvent).ThenByDescending(p => p.LastEventAt)
 2821            : source.OrderByDescending(p => p.HasLastEvent).ThenBy(p => p.LastEventAt);
 22
 23    public static IOrderedQueryable<ApplicationReadModel> ThenByLastEvent(this IOrderedQueryable<ApplicationReadModel> s
 024        => descending
 025            ? source.ThenByDescending(p => p.HasLastEvent).ThenByDescending(p => p.LastEventAt)
 026            : source.ThenByDescending(p => p.HasLastEvent).ThenBy(p => p.LastEventAt);
 27}