mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Fix TestCasePlaySongSelect
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
@ -36,9 +37,11 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
var storage = new TestStorage(@"TestCasePlaySongSelect");
|
var storage = new TestStorage(@"TestCasePlaySongSelect");
|
||||||
|
|
||||||
var dbConnectionString = storage.GetDatabaseConnectionString(@"client");
|
// this is by no means clean. should be replacing inside of OsuGameBase somehow.
|
||||||
|
var context = new OsuDbContext(storage.GetDatabaseConnectionString(@"client"));
|
||||||
|
context.Database.Migrate();
|
||||||
|
|
||||||
Func<OsuDbContext> contextFactory = () => new OsuDbContext(dbConnectionString);
|
Func<OsuDbContext> contextFactory = () => context;
|
||||||
|
|
||||||
dependencies.Cache(rulesets = new RulesetStore(contextFactory));
|
dependencies.Cache(rulesets = new RulesetStore(contextFactory));
|
||||||
dependencies.Cache(manager = new BeatmapManager(storage, contextFactory, rulesets, null));
|
dependencies.Cache(manager = new BeatmapManager(storage, contextFactory, rulesets, null));
|
||||||
|
Reference in New Issue
Block a user