< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Tlv.ChannelTypeTlv
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Tlv/ChannelTypeTlv.cs
Tag: 36_15743069263
Line coverage
87%
Covered lines: 7
Uncovered lines: 1
Coverable lines: 8
Total lines: 32
Line coverage: 87.5%
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_ChannelType()100%11100%
get_Features()100%210%
.ctor(...)100%11100%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Tlv/ChannelTypeTlv.cs

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Tlv;
 2
 3using Constants;
 4using Node;
 5
 6/// <summary>
 7/// Channel Type TLV.
 8/// </summary>
 9/// <remarks>
 10/// The channels type TLV is used in the AcceptChannel2Message to communicate the channel type that should be opened.
 11/// </remarks>
 12public class ChannelTypeTlv : BaseTlv
 13{
 14    /// <summary>
 15    /// The channel type
 16    /// </summary>
 1217    public byte[] ChannelType { get; }
 18
 19    /// <summary>
 20    /// The channel type features
 21    /// </summary>
 022    public FeatureSet Features { get; }
 23
 3224    public ChannelTypeTlv(byte[] channelType) : base(TlvConstants.ChannelType)
 25    {
 3226        ChannelType = channelType;
 3227        Features = FeatureSet.DeserializeFromBytes(channelType);
 28
 3229        Value = channelType;
 3230        Length = Value.Length;
 3231    }
 32}