mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Add tests for DifficultyIcon
This commit is contained in:
parent
060ea1d4fd
commit
d80a5d44ee
42
osu.Game.Tests/Visual/Beatmaps/TestSceneDifficultyIcon.cs
Normal file
42
osu.Game.Tests/Visual/Beatmaps/TestSceneDifficultyIcon.cs
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
// 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.
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Platform;
|
||||||
|
using osu.Game.Beatmaps.Drawables;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
|
using osu.Game.Rulesets.Osu;
|
||||||
|
using osu.Game.Tests.Beatmaps;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.Beatmaps
|
||||||
|
{
|
||||||
|
public partial class TestSceneDifficultyIcon : OsuTestScene
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void createDifficultyIcon()
|
||||||
|
{
|
||||||
|
DifficultyIcon difficultyIcon = null;
|
||||||
|
|
||||||
|
AddStep("create difficulty icon", () =>
|
||||||
|
{
|
||||||
|
Child = difficultyIcon = new DifficultyIcon(new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo, new OsuRuleset().RulesetInfo)
|
||||||
|
{
|
||||||
|
ShowTooltip = true,
|
||||||
|
ShowExtendedTooltip = true
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
AddStep("hide extended tooltip", () => difficultyIcon.ShowExtendedTooltip = false);
|
||||||
|
|
||||||
|
AddStep("hide tooltip", () => difficultyIcon.ShowTooltip = false);
|
||||||
|
|
||||||
|
AddStep("show tooltip", () => difficultyIcon.ShowTooltip = true);
|
||||||
|
|
||||||
|
AddStep("show extended tooltip", () => difficultyIcon.ShowExtendedTooltip = true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user