< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Bitcoin.ValueObjects.BitcoinKeyPath
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Bitcoin/ValueObjects/BitcoinKeyPath.cs
Tag: 36_15743069263
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 22
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Value()100%210%
.ctor(...)0%2040%
op_Implicit(...)100%210%
op_Implicit(...)100%210%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Bitcoin/ValueObjects/BitcoinKeyPath.cs

#LineLine coverage
 1namespace NLightning.Domain.Bitcoin.ValueObjects;
 2
 3public readonly record struct BitcoinKeyPath
 4{
 05    public byte[] Value { get; }
 6
 7    /// <summary>
 8    /// Initializes a new instance of the <see cref="BitcoinKeyPath"/> struct.
 9    /// </summary>
 10    /// <param name="value">The key path value.</param>
 11    public BitcoinKeyPath(byte[] value)
 12    {
 013        ArgumentNullException.ThrowIfNull(value);
 014        if (value is null || value.Length == 0)
 015            throw new ArgumentException("Key path must not be null or empty.", nameof(value));
 16
 017        Value = value;
 018    }
 19
 020    public static implicit operator BitcoinKeyPath(byte[] bytes) => new(bytes);
 021    public static implicit operator byte[](BitcoinKeyPath script) => script.Value;
 22}