< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Hosting.Options.RouteKeyComparer
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Hosting/Options/RouteKeyComparer.cs
Tag: Kestrun/Kestrun@9d3a582b2d63930269564a7591aa77ef297cadeb
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
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

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%11100%
Equals(...)50%22100%
GetHashCode(...)100%11100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Hosting/Options/RouteKeyComparer.cs

#LineLine coverage
 1namespace Kestrun.Hosting.Options;
 2
 3
 4internal class RouteKeyComparer : IEqualityComparer<(string Pattern, string Method)>
 5{
 16    private static readonly StringComparer comparer = StringComparer.OrdinalIgnoreCase;
 7
 78    public bool Equals((string Pattern, string Method) x, (string Pattern, string Method) y) => comparer.Equals(x.Patter
 9
 10    public int GetHashCode((string Pattern, string Method) obj)
 11    {
 1612        return HashCode.Combine(
 1613            comparer.GetHashCode(obj.Pattern),
 1614            comparer.GetHashCode(obj.Method));
 15    }
 16}