< Summary

Information
Class: Elsa.Workflows.Management.Services.WorkflowValidator
Assembly: Elsa.Workflows.Management
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Services/WorkflowValidator.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 19
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%
ValidateAsync()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Services/WorkflowValidator.cs

#LineLine coverage
 1using Elsa.Mediator.Contracts;
 2using Elsa.Workflows.Activities;
 3using Elsa.Workflows.Management.Models;
 4using Elsa.Workflows.Management.Notifications;
 5
 6namespace Elsa.Workflows.Management.Services;
 7
 8/// <inheritdoc />
 3209public class WorkflowValidator(INotificationSender notificationSender) : IWorkflowValidator
 10{
 11    /// <inheritdoc />
 12    public async Task<IEnumerable<WorkflowValidationError>> ValidateAsync(Workflow workflow, CancellationToken cancellat
 13    {
 514        var validationErrors = new List<WorkflowValidationError>();
 515        var notification = new WorkflowDefinitionValidating(workflow, validationErrors);
 516        await notificationSender.SendAsync(notification, cancellationToken);
 517        return validationErrors;
 518    }
 19}