< Summary - Combined Code Coverage

Information
Class: NLightning.Transport.Ipc.Responses.OpenChannelSubscriptionIpcResponse
Assembly: NLightning.Transport.Ipc
File(s): /home/runner/work/NLightning/NLightning/src/NLightning.Transport.Ipc/Responses/OpenChannelSubscriptionIpcResponse.cs
Tag: 57_24045730253
Line coverage
0%
Covered lines: 0
Uncovered lines: 13
Coverable lines: 13
Total lines: 32
Line coverage: 0%
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%210%
get_ChannelState()100%210%
get_TxId()100%210%
get_Index()100%210%
FromClientResponse(...)100%210%
FromClientResponse(...)100%210%

File(s)

/home/runner/work/NLightning/NLightning/src/NLightning.Transport.Ipc/Responses/OpenChannelSubscriptionIpcResponse.cs

#LineLine coverage
 1using MessagePack;
 2
 3namespace NLightning.Transport.Ipc.Responses;
 4
 5using Domain.Bitcoin.ValueObjects;
 6using Domain.Channels.Enums;
 7using Domain.Channels.ValueObjects;
 8using Domain.Client.Responses;
 9
 10/// <summary>
 11/// Response for OpenChannelSubscription command
 12/// </summary>
 13[MessagePackObject]
 14public sealed class OpenChannelSubscriptionIpcResponse
 15{
 016    [Key(0)] public required ChannelId ChannelId { get; init; }
 017    [Key(1)] public required ChannelState ChannelState { get; init; }
 018    [Key(2)] public TxId? TxId { get; init; }
 019    [Key(3)] public uint? Index { get; init; }
 20
 21    public static OpenChannelSubscriptionIpcResponse FromClientResponse(
 22        OpenChannelClientSubscriptionResponse clientResponse)
 023    {
 024        return new OpenChannelSubscriptionIpcResponse
 025        {
 026            ChannelId = clientResponse.ChannelId,
 027            ChannelState = clientResponse.ChannelState,
 028            TxId = clientResponse.TxId,
 029            Index = clientResponse.Index
 030        };
 031    }
 32}