< Summary

Information
Class: Elsa.Workflows.Activities.NotFoundActivity
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/NotFoundActivity.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 48
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%
.ctor(...)100%11100%
get_MissingTypeName()100%11100%
get_MissingTypeVersion()100%11100%
get_OriginalActivityJson()100%11100%
Execute(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/NotFoundActivity.cs

#LineLine coverage
 1using System.ComponentModel;
 2using System.Runtime.CompilerServices;
 3using Elsa.Workflows.Attributes;
 4using Elsa.Workflows.Exceptions;
 5using JetBrains.Annotations;
 6
 7namespace Elsa.Workflows.Activities;
 8
 9/// <summary>
 10/// This activity is instantiated in case a workflow references an activity type that could not be found.
 11/// </summary>
 12[Browsable(false)]
 13[Activity("Elsa", "System", "A placeholder activity that will be used in case a workflow definition references an activi
 14[PublicAPI]
 15public class NotFoundActivity : CodeActivity
 16{
 17    /// <inheritdoc />
 1418    public NotFoundActivity([CallerFilePath] string? source = null, [CallerLineNumber] int? line = null) : base(source, 
 19    {
 1420    }
 21
 22    /// <inheritdoc />
 723    public NotFoundActivity(string missingTypeName, [CallerFilePath] string? source = null, [CallerLineNumber] int? line
 24    {
 725        MissingTypeName = missingTypeName;
 726    }
 27
 28    /// <summary>
 29    /// The type name of the missing activity type.
 30    /// </summary>
 2831    public string MissingTypeName { get; set; } = null!;
 32
 33    /// <summary>
 34    /// The version of the missing activity type.
 35    /// </summary>
 2836    public int MissingTypeVersion { get; set; }
 37
 38    /// <summary>
 39    /// The original activity JSON.
 40    /// </summary>
 1441    public string OriginalActivityJson { get; set; } = null!;
 42
 43    /// <inheritdoc />
 44    protected override void Execute(ActivityExecutionContext context)
 45    {
 746        throw new ActivityNotFoundException(MissingTypeName, MissingTypeVersion);
 47    }
 48}