< 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_RestaurantId()100%1100%
get_TimeFrom()100%1100%
get_TimeTo()100%1100%
get_WeekdayId()100%1100%
get_Weekday()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/OpeningTime.cs

#LineLine coverage
 1using Snacks.Domain.Abstractions;
 2
 3namespace Snacks.Domain.Models;
 4
 5public class OpeningTime : IOpeningTime
 6{
 7
 1248    public int Id { get; set; } = 0;
 1109    public int RestaurantId { get; set; } = 0;
 11210    public TimeSpan TimeFrom { get; set; } = TimeSpan.Zero;
 10811    public TimeSpan TimeTo { get; set; } = TimeSpan.Zero;
 10812    public int WeekdayId { get; set; } = 0;
 10013    public string? Weekday { get; set; } = null;
 14
 13815    public OpeningTime() { }
 416    public OpeningTime(int id, int restaurantId, TimeSpan timeFrom, TimeSpan timeTo, int weekdayId, string weekday)
 417    {
 418        RestaurantId = restaurantId;
 419        TimeFrom = timeFrom;
 420        TimeTo = timeTo;
 421        this.Id = id;
 422        this.WeekdayId = weekdayId;
 423        this.Weekday = weekday;
 424    }
 25    public override string ToString()
 226    {
 227        return $"OpeningTime(id:{Id}, RestaurantId:{RestaurantId}, TimeFrom:{TimeFrom}, TimeTo:{TimeTo}, WeekdayId:{Week
 228    }
 29
 30    public int CompareTo(IOpeningTime? other)
 031    {
 032        if (other == null) return 1;
 033        return this.Id.CompareTo(other.Id);
 034    }
 35}