< Summary

Line coverage
73%
Covered lines: 11
Uncovered lines: 4
Coverable lines: 15
Total lines: 27
Line coverage: 73.3%
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 Cyclomatic complexity Line coverage
get_Id()100%1100%
get_Name()100%1100%
.ctor()100%1100%
.ctor(...)100%1100%
ToString()100%1100%
CompareTo(...)0%20%

File(s)

/home/rob/github-runner/_work/snacks-bb-g1-weidinger-g1-sinnreich/snacks-bb-g1-weidinger-g1-sinnreich/src/Snacks.Domain/Models/Country.cs

#LineLine coverage
 1using Snacks.Domain.Abstractions;
 2
 3namespace Snacks.Domain.Models;
 4
 5public class Country : ICountry
 6{
 967    public int Id { get; set; } = 0;
 868    public string? Name { get; set; } = null;
 9
 9610    public Country() { }
 411    public Country(int id, string? name)
 412    {
 413        Id = id;
 414        Name = name;
 415    }
 16
 17    public override string ToString()
 218    {
 219        return $"Country(id:{Id}, Name:{Name})";
 220    }
 21
 22    public int CompareTo(ICountry? other)
 023    {
 024        if (other == null) return 1;
 025        return this.Id.CompareTo(other.Id);
 026    }
 27}