< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Crypto.ValueObjects.CompactSignature
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Crypto/ValueObjects/CompactSignature.cs
Tag: 36_15743069263
Line coverage
81%
Covered lines: 9
Uncovered lines: 2
Coverable lines: 11
Total lines: 24
Line coverage: 81.8%
Branch coverage
50%
Covered branches: 3
Total branches: 6
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Value()100%11100%
.ctor(...)50%6.84671.43%
op_Implicit(...)100%11100%
op_Implicit(...)100%11100%
op_Implicit(...)100%11100%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Crypto/ValueObjects/CompactSignature.cs

#LineLine coverage
 1namespace NLightning.Domain.Crypto.ValueObjects;
 2
 3using Constants;
 4using Interfaces;
 5
 6public record CompactSignature : IValueObject
 7{
 1888    public byte[] Value { get; }
 9
 22010    public CompactSignature(byte[] value)
 11    {
 22012        ArgumentNullException.ThrowIfNull(value, nameof(value));
 22013        if (value.Length is < CryptoConstants.MinSignatureSize or > CryptoConstants.MaxSignatureSize)
 014            throw new ArgumentOutOfRangeException(nameof(value),
 015                                                  $"Signature must be less than or equal to {CryptoConstants.MaxSignatur
 16
 22017        Value = value;
 22018    }
 19
 15220    public static implicit operator CompactSignature(byte[] bytes) => new(bytes);
 17221    public static implicit operator byte[](CompactSignature hash) => hash.Value;
 22
 1623    public static implicit operator ReadOnlyMemory<byte>(CompactSignature compactPubKey) => compactPubKey.Value;
 24}