1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:23:22 +08:00

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()
{
testUserSkin = new TestSource("user");
testBeatmapSkin = new TestSource("beatmap");
testBeatmapSkin = new BeatmapTestSource();
}
[Test]
@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Osu.Tests
public CustomSkinWorkingBeatmap(IBeatmap beatmap, Storyboard storyboard, IFrameBasedClock frameBasedClock, AudioManager audio, ISkinSource skin)
: 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.");
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
{
private readonly string identifier;