Centralise and update WorkingBeatmap creation in test cases

This commit is contained in:
Dean Herbert
2019-05-31 14:40:53 +09:00
parent 80d65f9a3b
commit f33a5bc54c
34 changed files with 278 additions and 250 deletions

View File

@ -18,7 +18,7 @@ namespace osu.Game.Beatmaps
{
private readonly OsuGameBase game;
public DummyWorkingBeatmap(OsuGameBase game = null)
public DummyWorkingBeatmap(OsuGameBase game)
: base(new BeatmapInfo
{
Metadata = new BeatmapMetadata
@ -34,7 +34,7 @@ namespace osu.Game.Beatmaps
OverallDifficulty = 0,
},
Ruleset = new DummyRulesetInfo()
})
}, game.Audio)
{
this.game = game;
}
@ -43,7 +43,7 @@ namespace osu.Game.Beatmaps
protected override Texture GetBackground() => game?.Textures.Get(@"Backgrounds/bg4");
protected override Track GetTrack() => game?.Audio.Tracks.GetVirtual(1000);
protected override Track GetTrack() => game?.Audio?.Tracks.GetVirtual(1000);
private class DummyRulesetInfo : RulesetInfo
{