Update TestSceneSkinFallbacks.cs

This commit is contained in:
Craftplacer
2020-08-29 13:50:29 +02:00
parent 82acb3506c
commit 9ce9ba3a0d

View File

@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Osu.Tests
public TestSceneSkinFallbacks() public TestSceneSkinFallbacks()
{ {
testUserSkin = new TestSource("user"); testUserSkin = new TestSource("user");
testBeatmapSkin = new TestSource("beatmap"); testBeatmapSkin = new BeatmapTestSource();
} }
[Test] [Test]
@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Osu.Tests
public CustomSkinWorkingBeatmap(IBeatmap beatmap, Storyboard storyboard, IFrameBasedClock frameBasedClock, AudioManager audio, ISkinSource skin) public CustomSkinWorkingBeatmap(IBeatmap beatmap, Storyboard storyboard, IFrameBasedClock frameBasedClock, AudioManager audio, ISkinSource skin)
: base(beatmap, storyboard, frameBasedClock, audio) : base(beatmap, storyboard, frameBasedClock, audio)
{ {
if (!(skinSource is IBeatmapSkin)) if (!(skin is IBeatmapSkin))
throw new ArgumentException("The provided skin source must be of type IBeatmapSkin."); throw new ArgumentException("The provided skin source must be of type IBeatmapSkin.");
skinSource = skin; skinSource = skin;
@ -115,6 +115,14 @@ namespace osu.Game.Rulesets.Osu.Tests
} }
} }
public class BeatmapTestSource : TestSource, IBeatmapSkin
{
public BeatmapTestSource()
: base("beatmap")
{
}
}
public class TestSource : ISkinSource public class TestSource : ISkinSource
{ {
private readonly string identifier; private readonly string identifier;