< Summary

Information
Class: Elsa.Api.Client.Shared.Models.SwitchCase
Assembly: Elsa.Api.Client
File(s): /home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Shared/Models/SwitchCase.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
get_Label()100%210%
get_Condition()100%210%
get_Activity()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Shared/Models/SwitchCase.cs

#LineLine coverage
 1using System.Diagnostics;
 2using System.Text.Json.Nodes;
 3using Elsa.Api.Client.Resources.Scripting.Models;
 4
 5namespace Elsa.Api.Client.Shared.Models;
 6
 7/// <summary>
 8/// Represents a case in a switch statement.
 9/// </summary>
 10public class SwitchCase
 11{
 12    /// <summary>
 13    /// Gets or sets the label of the case.
 14    /// </summary>
 015    public string Label { get; set; } = default!;
 16
 17    /// <summary>
 18    /// Gets or sets the condition of the case.
 19    /// </summary>
 020    public Expression Condition { get; set; } = Expression.CreateLiteral("");
 21
 22    /// <summary>
 23    /// When used in a <see cref="Switch"/> activity, specifies the activity to schedule when the condition evaluates to
 24    /// </summary>
 025    public JsonObject? Activity { get; set; }
 26}