1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:47:24 +08:00

Use regular test steps rather than one-time set up and scheduling

This commit is contained in:
Salman Ahmed 2021-05-08 18:21:29 +03:00
parent d9605e8070
commit 3575d9847c

View File

@ -12,12 +12,12 @@ namespace osu.Game.Tests.Visual.Ranking
{
public class TestSceneStarRatingDisplay : OsuTestScene
{
[SetUp]
public void SetUp() => Schedule(() =>
[Test]
public void TestDisplay()
{
StarRatingDisplay changingStarRating;
StarRatingDisplay changingStarRating = null;
Child = new FillFlowContainer
AddStep("load displays", () => Child = new FillFlowContainer
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -32,12 +32,12 @@ namespace osu.Game.Tests.Visual.Ranking
new StarRatingDisplay(new StarDifficulty(10.11, 0)),
changingStarRating = new StarRatingDisplay(),
}
};
});
Scheduler.AddDelayed(() =>
AddRepeatStep("change bottom rating", () =>
{
changingStarRating.Current.Value = new StarDifficulty(RNG.NextDouble(0, 10), RNG.Next());
}, 500, true);
});
}, 10);
}
}
}