1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Pass GameHost to BeatmapManager in visual tests

This commit is contained in:
Shane Woolcock 2019-01-22 22:07:41 +10:30
parent 59eb33684d
commit fbed8c3242

View File

@ -11,6 +11,7 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Extensions;
using osu.Framework.MathUtils;
using osu.Framework.Platform;
using osu.Game.Beatmaps;
using osu.Game.Database;
using osu.Game.Rulesets;
@ -81,7 +82,7 @@ namespace osu.Game.Tests.Visual
}
[BackgroundDependencyLoader]
private void load()
private void load(GameHost host)
{
factory = new DatabaseContextFactory(LocalStorage);
factory.ResetDatabase();
@ -95,7 +96,7 @@ namespace osu.Game.Tests.Visual
usage.Migrate();
Dependencies.Cache(rulesets = new RulesetStore(factory));
Dependencies.Cache(manager = new BeatmapManager(LocalStorage, factory, rulesets, null, null, null, defaultBeatmap = Beatmap.Default));
Dependencies.Cache(manager = new BeatmapManager(LocalStorage, factory, rulesets, null, null, host, defaultBeatmap = Beatmap.Default));
Beatmap.SetDefault();
}