< 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: 36_15743069263
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 31
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    {
 015    }
 16
 17    public override bool Equals(object? obj)
 18    {
 019        return obj is BlockchainStateEntity other && Equals(other);
 20    }
 21
 22    public bool Equals(BlockchainStateEntity other)
 23    {
 024        return Id.Equals(other.Id);
 25    }
 26
 27    public override int GetHashCode()
 28    {
 029        return Id.GetHashCode();
 30    }
 31}