mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Further simplified beatmap colouring tests.
This commit is contained in:
@ -77,35 +77,13 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
AddAssert("is custom user skin colours", () => TestPlayer.UsableComboColours.SequenceEqual(TestSkin.Colours));
|
||||
}
|
||||
|
||||
protected override ExposedPlayer CreateTestPlayer(bool userHasCustomColours) => new OsuExposedPlayer(userHasCustomColours);
|
||||
|
||||
private class OsuExposedPlayer : ExposedPlayer
|
||||
{
|
||||
public OsuExposedPlayer(bool userHasCustomColours)
|
||||
: base(userHasCustomColours)
|
||||
{
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
dependencies.CacheAs<ISkinSource>(new OsuTestSkin(UserHasCustomColours));
|
||||
return dependencies;
|
||||
}
|
||||
}
|
||||
|
||||
private class OsuCustomSkinWorkingBeatmap : CustomSkinWorkingBeatmap
|
||||
{
|
||||
private readonly bool hasColours;
|
||||
|
||||
public OsuCustomSkinWorkingBeatmap(AudioManager audio, bool hasColours)
|
||||
: base(createBeatmap(), audio, hasColours)
|
||||
{
|
||||
this.hasColours = hasColours;
|
||||
}
|
||||
|
||||
protected override ISkin GetSkin() => new OsuTestBeatmapSkin(BeatmapInfo, hasColours);
|
||||
|
||||
private static IBeatmap createBeatmap() =>
|
||||
new Beatmap
|
||||
{
|
||||
@ -117,21 +95,5 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
HitObjects = { new HitCircle { Position = new Vector2(256, 192) } }
|
||||
};
|
||||
}
|
||||
|
||||
private class OsuTestBeatmapSkin : TestBeatmapSkin
|
||||
{
|
||||
public OsuTestBeatmapSkin(BeatmapInfo beatmap, bool hasColours)
|
||||
: base(beatmap, hasColours)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private class OsuTestSkin : TestSkin
|
||||
{
|
||||
public OsuTestSkin(bool hasCustomColours)
|
||||
: base(hasCustomColours)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user