< Summary

Line coverage
82%
Covered lines: 19
Uncovered lines: 4
Coverable lines: 23
Total lines: 35
Line coverage: 82.6%
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%
get_MaxDistance()100%1100%
get_Picture()100%1100%
get_Webhook()100%1100%
get_AddressId()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/Restaurant.cs

#LineLine coverage
 1using Snacks.Domain.Abstractions;
 2
 3namespace Snacks.Domain.Models;
 4
 5public class Restaurant : IRestaurant
 6{
 1187    public int Id { get; set; } = 0;
 1028    public string? Name { get; set; } = null;
 969    public decimal MaxDistance { get; set; } = 0;
 8810    public byte[] Picture { get; set; } = null!;
 9411    public string? Webhook { get; set; } = null;
 9412    public int AddressId { get; set; } = 0;
 13
 11414    public Restaurant() { }
 615    public Restaurant(int id, string? name, decimal maxDistance, byte[] picture, string? webhook, int addressId)
 616    {
 617        Id = id;
 618        Name = name;
 619        MaxDistance = maxDistance;
 620        Picture = picture;
 621        Webhook = webhook;
 622        AddressId = addressId;
 623    }
 24    public override string ToString()
 225    {
 226        return $"Restaurant(id:{Id}, Name:{Name}, MaxDistance:{MaxDistance}, Webhook:{Webhook}, AdressId: {AddressId} )"
 227    }
 28
 29    public int CompareTo(IRestaurant? other)
 030    {
 031        if (other == null) return 1;
 032        return this.Id.CompareTo(other.Id);
 033    }
 34
 35}