Implement FindProvider and AllSources properly on all test ISkinSources

This commit is contained in:
Salman Ahmed
2021-06-22 12:02:21 +03:00
parent c1284940e1
commit 31cbb36a64
5 changed files with 10 additions and 9 deletions

View File

@ -331,7 +331,7 @@ namespace osu.Game.Tests.Visual.Gameplay
public ISkin FindProvider(Func<ISkin, bool> lookupFunction) => throw new NotImplementedException();
public IEnumerable<ISkin> AllSources => Enumerable.Empty<ISkin>();
public IEnumerable<ISkin> AllSources => throw new NotImplementedException();
public event Action SourceChanged
{

View File

@ -147,8 +147,8 @@ namespace osu.Game.Tests.Visual.Gameplay
public Texture GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) => source?.GetTexture(componentName, wrapModeS, wrapModeT);
public ISample GetSample(ISampleInfo sampleInfo) => source?.GetSample(sampleInfo);
public IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup) => source?.GetConfig<TLookup, TValue>(lookup);
public ISkin FindProvider(Func<ISkin, bool> lookupFunction) => source?.FindProvider(lookupFunction);
public IEnumerable<ISkin> AllSources => source.AllSources;
public ISkin FindProvider(Func<ISkin, bool> lookupFunction) => lookupFunction(this) ? this : source?.FindProvider(lookupFunction);
public IEnumerable<ISkin> AllSources => new[] { this }.Concat(source?.AllSources);
public void TriggerSourceChanged()
{