1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 16:32:54 +08:00

Move helper functions to bottom of class

This commit is contained in:
Dean Herbert 2020-10-29 15:10:42 +09:00
parent fe409a55e6
commit fa85751425

View File

@ -61,11 +61,6 @@ namespace osu.Game.Tests.Visual.Gameplay
finish();
}
private OsuFramedReplayInputHandler replayHandler =>
(OsuFramedReplayInputHandler)Stack.ChildrenOfType<OsuInputManager>().First().ReplayInputHandler;
private Player player => Stack.CurrentScreen as Player;
[Test]
public void TestFrameStarvationAndResume()
{
@ -94,9 +89,6 @@ namespace osu.Game.Tests.Visual.Gameplay
AddAssert("time advanced", () => currentFrameStableTime > pausedTime);
}
private double currentFrameStableTime
=> player.ChildrenOfType<FrameStabilityContainer>().First().FrameStableClock.CurrentTime;
[Test]
public void TestPlayStartsWithNoFrames()
{
@ -203,6 +195,14 @@ namespace osu.Game.Tests.Visual.Gameplay
AddAssert("screen didn't change", () => Stack.CurrentScreen is Spectator);
}
private OsuFramedReplayInputHandler replayHandler =>
(OsuFramedReplayInputHandler)Stack.ChildrenOfType<OsuInputManager>().First().ReplayInputHandler;
private Player player => Stack.CurrentScreen as Player;
private double currentFrameStableTime
=> player.ChildrenOfType<FrameStabilityContainer>().First().FrameStableClock.CurrentTime;
private void waitForPlayer() => AddUntilStep("wait for player", () => Stack.CurrentScreen is Player);
private void start(int? beatmapId = null) => AddStep("start play", () => testSpectatorStreamingClient.StartPlay(beatmapId ?? importedBeatmapId));