< Summary

Information
Class: Elsa.Workflows.Api.Endpoints.CommitStrategies.CommitStrategyDescriptor
Assembly: Elsa.Workflows.Api
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Api/Endpoints/CommitStrategies/Models.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 16
Line coverage: 0%
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
get_Name()100%210%
FromStrategyMetadata(...)100%210%
FromStrategyMetadata(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Api/Endpoints/CommitStrategies/Models.cs

#LineLine coverage
 1using Elsa.Workflows.CommitStates;
 2
 3namespace Elsa.Workflows.Api.Endpoints.CommitStrategies;
 4
 05internal record CommitStrategyDescriptor(string Name, string DisplayName, string Description)
 6{
 7    public static CommitStrategyDescriptor FromStrategyMetadata(CommitStrategyMetadata metadata)
 8    {
 09        return new(metadata.Name, metadata.DisplayName, metadata.Description);
 10    }
 11
 12    public static IEnumerable<CommitStrategyDescriptor> FromStrategyMetadata(IEnumerable<CommitStrategyMetadata> metadat
 13    {
 014        return metadata.Select(FromStrategyMetadata);
 15    }
 16}