< Summary

Information
Class: Elsa.Http.HttpStatusCodeCase
Assembly: Elsa.Http
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Models/HttpStatusCodeCase.cs
Line coverage
75%
Covered lines: 6
Uncovered lines: 2
Coverable lines: 8
Total lines: 37
Line coverage: 75%
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%210%
.ctor(...)100%11100%
get_StatusCode()100%11100%
get_Activity()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Models/HttpStatusCodeCase.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2using Elsa.Workflows;
 3
 4namespace Elsa.Http;
 5
 6/// <summary>
 7/// A binding between an HTTP status code and an activity.
 8/// </summary>
 9public class HttpStatusCodeCase
 10{
 11    /// <summary>
 12    /// Creates a new instance of the <see cref="HttpStatusCodeCase"/> class.
 13    /// </summary>
 14    [JsonConstructor]
 015    public HttpStatusCodeCase()
 16    {
 017    }
 18
 19    /// <summary>
 20    /// Creates a new instance of the <see cref="HttpStatusCodeCase"/> class.
 21    /// </summary>
 522    public HttpStatusCodeCase(int statusCode, IActivity activity)
 23    {
 524        StatusCode = statusCode;
 525        Activity = activity;
 526    }
 27
 28    /// <summary>
 29    /// The HTTP status code to match.
 30    /// </summary>
 1031    public int StatusCode { get; set; }
 32
 33    /// <summary>
 34    /// The activity to execute when the HTTP status code matches.
 35    /// </summary>
 636    public IActivity? Activity { get; set; }
 37}