< Summary

Information
Class: EHonda.KicktippAi.Core.CollectedMatchOutcome
Assembly: EHonda.KicktippAi.Core
File(s): /home/runner/work/KicktippAi/KicktippAi/src/Core/MatchOutcomes.cs
Line coverage
100%
Covered lines: 10
Uncovered lines: 0
Coverable lines: 10
Total lines: 50
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_HomeGoals()100%11100%
set_HomeGoals(...)100%210%
get_AwayGoals()100%11100%
set_AwayGoals(...)100%210%
get_Availability()100%11100%
set_Availability(...)100%210%
get_TippSpielId()100%11100%
set_TippSpielId(...)100%210%
get_HasOutcome()100%11100%

File(s)

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

#LineLine coverage
 1using NodaTime;
 2
 3namespace EHonda.KicktippAi.Core;
 4
 5public enum MatchOutcomeAvailability
 6{
 7    Pending,
 8    Completed
 9}
 10
 11public enum MatchOutcomeWriteDisposition
 12{
 13    Created,
 14    Updated,
 15    Unchanged
 16}
 17
 118public record CollectedMatchOutcome(
 119    string HomeTeam,
 120    string AwayTeam,
 121    ZonedDateTime StartsAt,
 122    int Matchday,
 123    int? HomeGoals,
 124    int? AwayGoals,
 125    MatchOutcomeAvailability Availability,
 126    string? TippSpielId = null)
 27{
 128    public bool HasOutcome => Availability == MatchOutcomeAvailability.Completed;
 29}
 30
 31public record PersistedMatchOutcome(
 32    string CommunityContext,
 33    string Competition,
 34    string HomeTeam,
 35    string AwayTeam,
 36    ZonedDateTime StartsAt,
 37    int Matchday,
 38    int? HomeGoals,
 39    int? AwayGoals,
 40    MatchOutcomeAvailability Availability,
 41    string? TippSpielId,
 42    DateTimeOffset CreatedAt,
 43    DateTimeOffset UpdatedAt)
 44{
 45    public bool HasOutcome => Availability == MatchOutcomeAvailability.Completed;
 46}
 47
 48public record MatchOutcomeUpsertResult(
 49    MatchOutcomeWriteDisposition Disposition,
 50    PersistedMatchOutcome Outcome);