< Summary

Information
Class: Elsa.Extensions.RouteExtensions
Assembly: Elsa.Http
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Extensions/RouteExtensions.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 14
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
NormalizeRoute(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Extensions/RouteExtensions.cs

#LineLine coverage
 1// ReSharper disable once CheckNamespace
 2
 3namespace Elsa.Extensions;
 4
 5/// <summary>
 6/// Provides extension methods for strings that represent a route.
 7/// </summary>
 8public static class RouteExtensions
 9{
 10    /// <summary>
 11    /// Normalizes a route by ensuring a leading slash, removing any trailing slash.
 12    /// </summary>
 81813    public static string NormalizeRoute(this string path) => $"/{path.Trim('/')}";
 14}

Methods/Properties

NormalizeRoute(System.String)