< Summary

Information
Class: EHonda.KicktippAi.Core.Match
Assembly: EHonda.KicktippAi.Core
File(s): /home/runner/work/KicktippAi/KicktippAi/src/Core/Match.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 39
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
.ctor(...)100%210%
get_HomeTeam()100%11100%
set_HomeTeam(...)100%210%
get_AwayTeam()100%11100%
set_AwayTeam(...)100%210%
get_StartsAt()100%11100%
set_StartsAt(...)100%210%
get_Matchday()100%11100%
set_Matchday(...)100%210%
get_IsCancelled()100%11100%
set_IsCancelled(...)100%210%

File(s)

/home/runner/work/KicktippAi/KicktippAi/src/Core/Match.cs

#LineLine coverage
 1using NodaTime;
 2
 3namespace EHonda.KicktippAi.Core;
 4
 5/// <summary>
 6/// Represents a scheduled match between two teams.
 7/// </summary>
 8/// <param name="HomeTeam">The name of the home team.</param>
 9/// <param name="AwayTeam">The name of the away team.</param>
 10/// <param name="StartsAt">
 11/// The scheduled start time of the match.
 12/// <para>
 13/// <b>Important:</b> For cancelled matches (<see cref="IsCancelled"/> = true), this value is inherited from
 14/// the previous match in the time slot order. This preserves database key consistency since the
 15/// composite key (HomeTeam, AwayTeam, StartsAt, ...) must remain stable. See the cancellation handling
 16/// documentation at <c>docs/features/cancelled-matches.md</c> for details.
 17/// </para>
 18/// </param>
 19/// <param name="Matchday">The matchday number (e.g., 1-34 for Bundesliga).</param>
 20/// <param name="IsCancelled">
 21/// Indicates whether the match has been cancelled (German: "Abgesagt").
 22/// <para>
 23/// When true, the match appears on the Kicktipp page with "Abgesagt" instead of a date/time.
 24/// Cancelled matches can still receive predictions, but their <see cref="StartsAt"/> value
 25/// is inherited from the previous match slot (not a valid scheduled time).
 26/// </para>
 27/// <para>
 28/// <b>Design Decision:</b> We continue processing cancelled matches rather than skipping them because:
 29/// (1) users can still place predictions on Kicktipp, and (2) when rescheduled, we want to have
 30/// a prediction in place. The old prediction will carry over when the match gets a new time slot.
 31/// See <c>docs/features/cancelled-matches.md</c> for complete rationale.
 32/// </para>
 33/// </param>
 134public record Match(
 135    string HomeTeam,
 136    string AwayTeam,
 137    ZonedDateTime StartsAt,
 138    int Matchday,
 139    bool IsCancelled = false);