Skip to content

Commit

Permalink
#896: Introduce constants and use builders to reduce test verbosity a…
Browse files Browse the repository at this point in the history
…nd repetition
  • Loading branch information
laingsimon committed Jul 3, 2024
1 parent 4bffc3e commit f510e56
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 298 deletions.
12 changes: 12 additions & 0 deletions CourageScores.Tests/Models/Cosmos/Game/GameBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ public GameBuilder ForSeason(SeasonDto season)
return this;
}

public GameBuilder ForSeason(Guid seasonId)
{
_game.SeasonId = seasonId;
return this;
}

public GameBuilder Knockout(bool isKnockout = true)
{
_game.IsKnockout = isKnockout;
Expand Down Expand Up @@ -81,4 +87,10 @@ public GameBuilder WithAddress(string address)
_game.Address = address;
return this;
}

public GameBuilder Postponed()
{
_game.Postponed = true;
return this;
}
}
Loading

0 comments on commit f510e56

Please sign in to comment.