Simplify caching in test

This commit is contained in:
Dean Herbert 2021-06-28 14:44:52 +09:00
parent e387feb1d6
commit 73bd88cb31

View File

@ -24,12 +24,8 @@ namespace osu.Game.Tests.Rulesets
protected override Ruleset CreateRuleset() => new TestSceneRulesetDependencies.TestRuleset();
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
dependencies.CacheAs<ISkinSource>(new TestSkinProvider());
return dependencies;
}
[Cached(typeof(ISkinSource))]
private readonly ISkinSource testSource = new TestSkinProvider();
[Test]
public void TestEarlyAddedSkinRequester()