< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Messages.BaseMessage
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Messages/BaseMessage.cs
Tag: 30_15166811759
Line coverage
66%
Covered lines: 8
Uncovered lines: 4
Coverable lines: 12
Total lines: 33
Line coverage: 66.6%
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_Type()100%11100%
get_Payload()100%11100%
get_Extension()100%11100%
.ctor(...)100%11100%
.ctor(...)100%210%

File(s)

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

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Messages;
 2
 3using Interfaces;
 4using Models;
 5using Payloads;
 6using Payloads.Interfaces;
 7
 8/// <summary>
 9/// Base class for a message.
 10/// </summary>
 11public abstract class BaseMessage : IMessage
 12{
 13    /// <inheritdoc />
 17214    public ushort Type { get; }
 15
 16    /// <inheritdoc />
 119617    public virtual IMessagePayload Payload { get; protected init; }
 18
 19    /// <inheritdoc />
 77620    public TlvStream? Extension { get; protected init; }
 21
 36422    protected BaseMessage(ushort type, IMessagePayload payload, TlvStream? extension = null)
 23    {
 36424        Type = type;
 36425        Payload = payload;
 36426        Extension = extension;
 36427    }
 028    protected internal BaseMessage(ushort type)
 29    {
 030        Type = type;
 031        Payload = new PlaceholderPayload();
 032    }
 33}