< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Bitcoin.Wallet.Models.UtxoModel
Assembly: NLightning.Domain
File(s): /home/runner/work/NLightning/NLightning/src/NLightning.Domain/Bitcoin/Wallet/Models/UtxoModel.cs
Tag: 57_24045730253
Line coverage
0%
Covered lines: 0
Uncovered lines: 31
Coverable lines: 31
Total lines: 50
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_TxId()100%210%
get_Index()100%210%
get_Amount()100%210%
get_BlockHeight()100%210%
get_AddressIndex()100%210%
get_IsAddressChange()100%210%
get_AddressType()100%210%
get_LockedToChannelId()100%210%
get_WalletAddress()100%210%
.ctor(...)100%210%
.ctor(...)100%210%
SetWalletAddress(...)100%210%

File(s)

/home/runner/work/NLightning/NLightning/src/NLightning.Domain/Bitcoin/Wallet/Models/UtxoModel.cs

#LineLine coverage
 1namespace NLightning.Domain.Bitcoin.Wallet.Models;
 2
 3using Channels.ValueObjects;
 4using Enums;
 5using Money;
 6using ValueObjects;
 7
 8public sealed class UtxoModel
 9{
 010    public TxId TxId { get; }
 011    public uint Index { get; }
 012    public LightningMoney Amount { get; }
 013    public uint BlockHeight { get; }
 014    public uint AddressIndex { get; private set; }
 015    public bool IsAddressChange { get; private set; }
 016    public AddressType AddressType { get; private set; }
 017    public ChannelId? LockedToChannelId { get; set; }
 18
 019    public WalletAddressModel? WalletAddress { get; private set; }
 20
 021    public UtxoModel(TxId txId, uint index, LightningMoney amount, uint blockHeight, uint addressIndex,
 022                     bool isAddressChange, AddressType addressType)
 23    {
 024        TxId = txId;
 025        Index = index;
 026        Amount = amount;
 027        BlockHeight = blockHeight;
 028        AddressIndex = addressIndex;
 029        IsAddressChange = isAddressChange;
 030        AddressType = addressType;
 031    }
 32
 033    public UtxoModel(TxId txId, uint index, LightningMoney amount, uint blockHeight, WalletAddressModel walletAddress)
 34    {
 035        TxId = txId;
 036        Index = index;
 037        Amount = amount;
 038        BlockHeight = blockHeight;
 039        SetWalletAddress(walletAddress);
 040    }
 41
 42    public void SetWalletAddress(WalletAddressModel walletAddress)
 43    {
 044        WalletAddress = walletAddress;
 45
 046        AddressIndex = walletAddress.Index;
 047        IsAddressChange = walletAddress.IsChange;
 048        AddressType = walletAddress.AddressType;
 049    }
 50}