< Summary

Line coverage
80%
Covered lines: 17
Uncovered lines: 4
Coverable lines: 21
Total lines: 31
Line coverage: 80.9%
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_Comment()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/OrderAddress.cs

#LineLine coverage
 1using Snacks.Domain.Abstractions;
 2
 3namespace Snacks.Domain.Models;
 4
 5public class OrderAddress : IOrderAddress
 6{
 987    public int Id { get; set; } = 0;
 848    public string? Name { get; set; } = null;
 869    public string? Comment { get; set; } = null;
 8210    public int AddressId { get; set; } = 0;
 11
 3212    public OrderAddress()
 3213    {
 3214    }
 415    public OrderAddress(int id, string name, string comment, int addressId)
 416    {
 417        Id = id;
 418        Name = name;
 419        Comment = comment;
 420        AddressId = addressId;
 421    }
 22    public override string ToString()
 223    {
 224        return $"Id: {Id}, Name: {Name}, Comment: {Comment}, AddressId: {AddressId}";
 225    }
 26    public int CompareTo(IOrderAddress? other)
 027    {
 028        if (other == null) return 1;
 029        return this.Id.CompareTo(other.Id);
 030    }
 31}