< Summary

Information
Class: Elsa.Workflows.Activities.Flowchart.Models.Endpoint
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/Endpoint.cs
Line coverage
75%
Covered lines: 6
Uncovered lines: 2
Coverable lines: 8
Total lines: 38
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_Activity()100%11100%
get_Port()100%11100%

File(s)

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

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace Elsa.Workflows.Activities.Flowchart.Models;
 4
 5/// <summary>
 6/// Represents an endpoint of a connection.
 7/// </summary>
 8public class Endpoint
 9{
 10    /// <summary>
 11    /// Initializes a new instance of the <see cref="Endpoint"/> class.
 12    /// </summary>
 13    [JsonConstructor]
 014    public Endpoint()
 15    {
 016    }
 17
 18    /// <summary>
 19    /// Initializes a new instance of the <see cref="Endpoint"/> class.
 20    /// </summary>
 21    /// <param name="activity">The activity that the endpoint is connected to.</param>
 22    /// <param name="port">The port that the endpoint is connected to.</param>
 172823    public Endpoint(IActivity activity, string? port = null)
 24    {
 172825        Activity = activity;
 172826        Port = port;
 172827    }
 28
 29    /// <summary>
 30    /// The activity that the endpoint is connected to.
 31    /// </summary>
 2521432    public IActivity Activity { get; set; } = null!;
 33
 34    /// <summary>
 35    /// The port that the endpoint is connected to.
 36    /// </summary>
 1158237    public string? Port { get; set; }
 38}