Expose Dependencies from base OsuTestCase

This commit is contained in:
smoogipoo
2018-06-06 20:25:40 +09:00
parent f2ac5b8b2d
commit ebcfe97ccf
8 changed files with 17 additions and 50 deletions

View File

@ -15,16 +15,16 @@ namespace osu.Game.Tests.Visual
private readonly OsuTestBeatmap beatmap = new OsuTestBeatmap(new DummyWorkingBeatmap());
protected BindableBeatmap Beatmap => beatmap;
private DependencyContainer dependencies;
protected DependencyContainer Dependencies { get; private set; }
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
{
dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
Dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
dependencies.CacheAs<BindableBeatmap>(beatmap);
dependencies.CacheAs<IBindableBeatmap>(beatmap);
Dependencies.CacheAs<BindableBeatmap>(beatmap);
Dependencies.CacheAs<IBindableBeatmap>(beatmap);
return dependencies;
return Dependencies;
}
[BackgroundDependencyLoader]