< Summary

Information
Class: Elsa.Testing.Shared.FakeWorkflowExecutionContextSchedulerStrategy
Assembly: Elsa.Testing.Shared
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Testing.Shared/FakeWorkflowExecutionContextSchedulerStrategy.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 26
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
Schedule(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/common/Elsa.Testing.Shared/FakeWorkflowExecutionContextSchedulerStrategy.cs

#LineLine coverage
 1using Elsa.Workflows;
 2using Elsa.Workflows.Models;
 3using Elsa.Workflows.Options;
 4
 5namespace Elsa.Testing.Shared;
 6
 7/// <summary>
 8/// Bypasses validation and schedules the activity immediately.
 9/// </summary>
 10public class FakeWorkflowExecutionContextSchedulerStrategy : IWorkflowExecutionContextSchedulerStrategy
 11{
 12    /// <summary>
 13    /// Schedules an activity within the workflow execution context.
 14    /// </summary>
 15    /// <param name="context">The workflow execution context within which the activity will be scheduled.</param>
 16    /// <param name="activityNode">The activity node representing the activity to be scheduled.</param>
 17    /// <param name="owner">The execution context owning the activity execution.</param>
 18    /// <param name="options">Optional scheduling options for configuring the behavior of the scheduling process.</param
 19    /// <returns>Returns an <see cref="ActivityWorkItem"/> representing the scheduled activity work item.</returns>
 20    public ActivityWorkItem Schedule(WorkflowExecutionContext context, ActivityNode activityNode, ActivityExecutionConte
 21    {
 022        var workItem = new ActivityWorkItem(activityNode.Activity, owner);
 023        context.Scheduler.Schedule(workItem);
 024        return workItem;
 25    }
 26}