< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Messages.InitMessage
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Messages/InitMessage.cs
Tag: 30_15166811759
Line coverage
87%
Covered lines: 7
Uncovered lines: 1
Coverable lines: 8
Total lines: 34
Line coverage: 87.5%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Payload()100%11100%
get_NetworksTlv()100%210%
.ctor(...)100%22100%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Messages/InitMessage.cs

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Messages;
 2
 3using Constants;
 4using Models;
 5using Payloads;
 6using Tlv;
 7
 8/// <summary>
 9/// Represents an init message.
 10/// </summary>
 11/// <remarks>
 12/// The init message is used to communicate the features of the node.
 13/// The message type is 16.
 14/// </remarks>
 15public sealed class InitMessage : BaseMessage
 16{
 17    /// <summary>
 18    /// The payload of the message.
 19    /// </summary>
 2420    public new InitPayload Payload { get => (InitPayload)base.Payload; }
 21
 022    public NetworksTlv? NetworksTlv { get; }
 23
 6424    public InitMessage(InitPayload payload, NetworksTlv? networksTlv = null) : base(MessageTypes.INIT, payload)
 25    {
 6426        NetworksTlv = networksTlv;
 27
 6428        if (networksTlv is not null)
 29        {
 5630            Extension = new TlvStream();
 5631            Extension.Add(networksTlv);
 32        }
 6433    }
 34}