mirror of https://github.com/ppy/osu
Simplify caching in test
This commit is contained in:
parent
e387feb1d6
commit
73bd88cb31
|
@ -24,12 +24,8 @@ public class TestSceneRulesetSkinProvidingContainer : OsuTestScene
|
|||
|
||||
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()
|
||||
|
|
Loading…
Reference in New Issue