< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Payloads.TxAddOutputPayload
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Payloads/TxAddOutputPayload.cs
Tag: 36_15743069263
Line coverage
100%
Covered lines: 10
Uncovered lines: 0
Coverable lines: 10
Total lines: 54
Line coverage: 100%
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_ChannelId()100%11100%
get_SerialId()100%11100%
get_Amount()100%11100%
get_Script()100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Payloads/TxAddOutputPayload.cs

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Payloads;
 2
 3using Bitcoin.ValueObjects;
 4using Channels.ValueObjects;
 5using Interfaces;
 6using Messages;
 7using Money;
 8
 9/// <summary>
 10/// Represents a tx_add_output payload.
 11/// </summary>
 12/// <remarks>
 13/// The tx_add_output payload is used to add an output to the transaction.
 14/// </remarks>
 15/// <seealso cref="TxAddOutputMessage"/>
 16/// <seealso cref="Channels.ValueObjects.ChannelId"/>
 17public class TxAddOutputPayload : IChannelMessagePayload
 18{
 19    /// <summary>
 20    /// The channel id.
 21    /// </summary>
 822    public ChannelId ChannelId { get; }
 23
 24    /// <summary>
 25    /// The serial id.
 26    /// </summary>
 827    public ulong SerialId { get; }
 28
 29    /// <summary>
 30    /// The sats amount.
 31    /// </summary>
 832    public LightningMoney Amount { get; }
 33
 34    /// <summary>
 35    /// The spending script.
 36    /// </summary>
 1237    public BitcoinScript Script { get; }
 38
 39    /// <summary>
 40    /// Initializes a new instance of the <see cref="TxAddOutputPayload"/> class.
 41    /// </summary>
 42    /// <param name="channelId">The channel id.</param>
 43    /// <param name="serialId">The serial id.</param>
 44    /// <param name="amount">The sats amount.</param>
 45    /// <param name="script">The spending script.</param>
 46    /// <exception cref="ArgumentException">ScriptPubKey length is out of bounds.</exception>
 847    public TxAddOutputPayload(LightningMoney amount, ChannelId channelId, BitcoinScript script, ulong serialId)
 48    {
 849        ChannelId = channelId;
 850        SerialId = serialId;
 851        Amount = amount;
 852        Script = script;
 853    }
 54}