mirror of
https://github.com/ppy/osu
synced 2025-03-02 09:30:57 +00:00
Simplify caching in test
This commit is contained in:
parent
e387feb1d6
commit
73bd88cb31
@ -24,12 +24,8 @@ namespace osu.Game.Tests.Rulesets
|
|||||||
|
|
||||||
protected override Ruleset CreateRuleset() => new TestSceneRulesetDependencies.TestRuleset();
|
protected override Ruleset CreateRuleset() => new TestSceneRulesetDependencies.TestRuleset();
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
[Cached(typeof(ISkinSource))]
|
||||||
{
|
private readonly ISkinSource testSource = new TestSkinProvider();
|
||||||
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
|
||||||
dependencies.CacheAs<ISkinSource>(new TestSkinProvider());
|
|
||||||
return dependencies;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestEarlyAddedSkinRequester()
|
public void TestEarlyAddedSkinRequester()
|
||||||
|
Loading…
Reference in New Issue
Block a user