< Summary

Information
Class: Elsa.Workflows.Activities.Flowchart.Models.Token
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/Token.cs
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 26
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%
Create(...)100%11100%
get_FromActivityId()100%11100%
get_FromActivityName()100%11100%
get_Outcome()100%11100%
get_ToActivityId()100%11100%
get_ToActivityName()100%11100%
get_Consumed()100%11100%
get_Blocked()100%11100%
Consume()100%11100%
Block()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/Token.cs

#LineLine coverage
 1namespace Elsa.Workflows.Activities.Flowchart.Models;
 2
 3473internal class Token(string fromActivityId, string? fromActivityName, string? outcome, string toActivityId, string? toAc
 4{
 3475    public static Token Create(IActivity from, IActivity to, string? outcome) => new(from.Id, from.Name, outcome, to.Id,
 6
 4237    public string FromActivityId { get; } = fromActivityId;
 3478    public string? FromActivityName { get; } = fromActivityName;
 3839    public string? Outcome { get; } = outcome;
 199510    public string ToActivityId { get; } = toActivityId;
 34711    public string? ToActivityName { get; } = toActivityName;
 194912    public bool Consumed { get; private set; } = consumed;
 113813    public bool Blocked { get; private set; } = blocked;
 14
 15    public Token Consume()
 16    {
 34617        Consumed = true;
 34618        return this;
 19    }
 20
 21    public Token Block()
 22    {
 423        Blocked = true;
 424        return this;
 25    }
 26}