< Summary - Combined Code Coverage

Information
Class: NLightning.Infrastructure.Persistence.Entities.Bitcoin.BlockchainStateEntity
Assembly: NLightning.Infrastructure.Persistence
File(s): /home/runner/work/NLightning/NLightning/src/NLightning.Infrastructure.Persistence/Entities/Bitcoin/BlockchainStateEntity.cs
Tag: 57_24045730253
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 30
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
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_Id()100%210%
get_LastProcessedHeight()100%210%
get_LastProcessedBlockHash()100%210%
get_LastProcessedAt()100%210%
.ctor()100%210%
Equals(...)0%620%
Equals(...)100%210%
GetHashCode()100%210%

File(s)

/home/runner/work/NLightning/NLightning/src/NLightning.Infrastructure.Persistence/Entities/Bitcoin/BlockchainStateEntity.cs

#LineLine coverage
 1namespace NLightning.Infrastructure.Persistence.Entities.Bitcoin;
 2
 3using Domain.Crypto.ValueObjects;
 4
 5public class BlockchainStateEntity
 6{
 07    public required Guid Id { get; set; }
 08    public required uint LastProcessedHeight { get; set; }
 09    public required Hash LastProcessedBlockHash { get; set; }
 010    public required DateTime LastProcessedAt { get; set; }
 11
 12    // Default constructor for EF Core
 013    internal BlockchainStateEntity() { }
 14
 15    public override bool Equals(object? obj)
 16    {
 017        return obj is BlockchainStateEntity other && Equals(other);
 18    }
 19
 20    private bool Equals(BlockchainStateEntity other)
 21    {
 022        return Id.Equals(other.Id);
 23    }
 24
 25    public override int GetHashCode()
 26    {
 27        // ReSharper disable once NonReadonlyMemberInGetHashCode
 028        return Id.GetHashCode();
 29    }
 30}