Skip to content

Commit

Permalink
Fix test coverage not actually covering crash
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Aug 21, 2023
1 parent 1067769 commit 827d48a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions osu.Game.Tournament.Tests/Components/TestSceneSongBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace osu.Game.Tournament.Tests.Components
public partial class TestSceneSongBar : TournamentTestScene
{
private SongBar songBar = null!;
private TournamentBeatmap ladderBeatmap = null!;

[SetUpSteps]
public override void SetUpSteps()
Expand All @@ -22,9 +23,10 @@ public override void SetUpSteps()

AddStep("setup picks bans", () =>
{
ladderBeatmap = CreateSampleBeatmap();
Ladder.CurrentMatch.Value!.PicksBans.Add(new BeatmapChoice
{
BeatmapID = CreateSampleBeatmap().OnlineID,
BeatmapID = ladderBeatmap.OnlineID,
Team = TeamColour.Red,
Type = ChoiceType.Pick,
});
Expand Down Expand Up @@ -52,7 +54,7 @@ public void TestSongBar()
beatmap.StarRating = 4.56f;
beatmap.Length = 123456;
beatmap.BPM = 133;
beatmap.OnlineID = CreateSampleBeatmap().OnlineID;
beatmap.OnlineID = ladderBeatmap.OnlineID;

songBar.Beatmap = new TournamentBeatmap(beatmap);
});
Expand Down

0 comments on commit 827d48a

Please sign in to comment.