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

fix missing dependency for slider test cases

This commit is contained in:
Unknown 2019-01-23 14:03:26 +01:00
parent 33b46dc4e8
commit 4d310c3226
2 changed files with 24 additions and 0 deletions

View File

@ -16,11 +16,13 @@ using osuTK.Graphics;
using osu.Game.Rulesets.Mods;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Osu.Configuration;
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
namespace osu.Game.Rulesets.Osu.Tests
@ -39,6 +41,16 @@ namespace osu.Game.Rulesets.Osu.Tests
typeof(DrawableOsuHitObject)
};
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
var configCache = dependencies.Get<RulesetConfigCache>();
dependencies.CacheAs((OsuConfigManager)configCache.GetConfigFor(new OsuRuleset()));
return dependencies;
}
private readonly Container content;
protected override Container<Drawable> Content => content;

View File

@ -3,11 +3,13 @@
using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Osu.Configuration;
using osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders;
using osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components;
using osu.Game.Rulesets.Osu.Objects;
@ -29,6 +31,16 @@ namespace osu.Game.Rulesets.Osu.Tests
typeof(PathControlPointPiece)
};
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
var configCache = dependencies.Get<RulesetConfigCache>();
dependencies.CacheAs((OsuConfigManager)configCache.GetConfigFor(new OsuRuleset()));
return dependencies;
}
private readonly DrawableSlider drawableObject;
public TestCaseSliderSelectionBlueprint()