< Summary

Information
Class: Elsa.Testing.Shared.Activities.TriggerSignal
Assembly: Elsa.Testing.Shared.Component
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Testing.Shared.Component/Activities/TriggerSignal.cs
Line coverage
40%
Covered lines: 2
Uncovered lines: 3
Coverable lines: 5
Total lines: 16
Line coverage: 40%
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%
get_Signal()100%11100%
Execute(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/common/Elsa.Testing.Shared.Component/Activities/TriggerSignal.cs

#LineLine coverage
 1using Elsa.Testing.Shared.Services;
 2using Elsa.Workflows;
 3using Elsa.Workflows.Runtime;
 4
 5namespace Elsa.Testing.Shared.Activities;
 6
 167public class TriggerSignal(string signal) : CodeActivity
 8{
 249    public string Signal { get; set; } = signal;
 10
 11    protected override void Execute(ActivityExecutionContext context)
 12    {
 013        var signalManager = context.GetRequiredService<SignalManager>();
 014        context.DeferTask(() => signalManager.Trigger(Signal));
 015    }
 16}