1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-17 04:23:24 +08:00
osu-lazer/osu.Game.Tests/Visual/Gameplay/TestSceneSkinnableRankDisplay.cs
2023-08-07 09:50:54 +08:00

37 lines
1.7 KiB
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play.HUD;
using osu.Game.Skinning;
namespace osu.Game.Tests.Visual.Gameplay
{
public partial class TestSceneSkinnableRankDisplay : SkinnableHUDComponentTestScene
{
[Cached]
private ScoreProcessor scoreProcessor = new ScoreProcessor(new OsuRuleset());
protected override Drawable CreateDefaultImplementation() => new DefaultRankDisplay();
protected override Drawable CreateLegacyImplementation() => new LegacyRankDisplay();
[Test]
public void TestChangingRank()
{
AddStep("Set rank to SS Hidden", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.XH);
AddStep("Set rank to SS", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.X);
AddStep("Set rank to S Hidden", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.SH);
AddStep("Set rank to S", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.S);
AddStep("Set rank to A", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.A);
AddStep("Set rank to B", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.B);
AddStep("Set rank to C", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.C);
AddStep("Set rank to D", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.D);
AddStep("Set rank to F", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.F);
}
}
}