mirror of https://github.com/ppy/osu
Fix test coverage not actually covering crash
This commit is contained in:
parent
1067769b24
commit
827d48adcc
|
@ -14,6 +14,7 @@ namespace osu.Game.Tournament.Tests.Components
|
||||||
public partial class TestSceneSongBar : TournamentTestScene
|
public partial class TestSceneSongBar : TournamentTestScene
|
||||||
{
|
{
|
||||||
private SongBar songBar = null!;
|
private SongBar songBar = null!;
|
||||||
|
private TournamentBeatmap ladderBeatmap = null!;
|
||||||
|
|
||||||
[SetUpSteps]
|
[SetUpSteps]
|
||||||
public override void SetUpSteps()
|
public override void SetUpSteps()
|
||||||
|
@ -22,9 +23,10 @@ public override void SetUpSteps()
|
||||||
|
|
||||||
AddStep("setup picks bans", () =>
|
AddStep("setup picks bans", () =>
|
||||||
{
|
{
|
||||||
|
ladderBeatmap = CreateSampleBeatmap();
|
||||||
Ladder.CurrentMatch.Value!.PicksBans.Add(new BeatmapChoice
|
Ladder.CurrentMatch.Value!.PicksBans.Add(new BeatmapChoice
|
||||||
{
|
{
|
||||||
BeatmapID = CreateSampleBeatmap().OnlineID,
|
BeatmapID = ladderBeatmap.OnlineID,
|
||||||
Team = TeamColour.Red,
|
Team = TeamColour.Red,
|
||||||
Type = ChoiceType.Pick,
|
Type = ChoiceType.Pick,
|
||||||
});
|
});
|
||||||
|
@ -52,7 +54,7 @@ public void TestSongBar()
|
||||||
beatmap.StarRating = 4.56f;
|
beatmap.StarRating = 4.56f;
|
||||||
beatmap.Length = 123456;
|
beatmap.Length = 123456;
|
||||||
beatmap.BPM = 133;
|
beatmap.BPM = 133;
|
||||||
beatmap.OnlineID = CreateSampleBeatmap().OnlineID;
|
beatmap.OnlineID = ladderBeatmap.OnlineID;
|
||||||
|
|
||||||
songBar.Beatmap = new TournamentBeatmap(beatmap);
|
songBar.Beatmap = new TournamentBeatmap(beatmap);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue