From f664fca0ddf2ac466af1d27048f0d370c74ecb94 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 15 Feb 2021 16:11:17 +0900 Subject: [PATCH] Tidy up tests (and remove duplicate with new call logic) --- .../Visual/Gameplay/TestScenePause.cs | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestScenePause.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePause.cs index 1ad1479cd4..aa56c636ab 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestScenePause.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestScenePause.cs @@ -90,20 +90,6 @@ namespace osu.Game.Tests.Visual.Gameplay resumeAndConfirm(); } - [Test] - public void TestExternalPauseDuringCooldownTooSoon() - { - AddStep("move cursor outside", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopLeft - new Vector2(10))); - - pauseAndConfirm(); - - resume(); - pauseExternally(); - - confirmResumed(); - confirmNotExited(); - } - [Test] public void TestUserPauseDuringCooldownTooSoon() { @@ -112,7 +98,7 @@ namespace osu.Game.Tests.Visual.Gameplay pauseAndConfirm(); resume(); - AddStep("pause via exit key", () => Player.ExitViaPause()); + pauseFromUserExitKey(); confirmResumed(); confirmNotExited(); @@ -154,7 +140,7 @@ namespace osu.Game.Tests.Visual.Gameplay confirmClockRunning(false); - pauseExternally(); + pauseFromUserExitKey(); confirmPausedWithNoOverlay(); AddAssert("fail overlay still shown", () => Player.FailOverlayVisible); @@ -266,7 +252,7 @@ namespace osu.Game.Tests.Visual.Gameplay private void pauseAndConfirm() { - pauseExternally(); + pauseFromUserExitKey(); confirmPaused(); } @@ -313,7 +299,7 @@ namespace osu.Game.Tests.Visual.Gameplay } private void restart() => AddStep("restart", () => Player.Restart()); - private void pauseExternally() => AddStep("pause", () => Player.Pause()); + private void pauseFromUserExitKey() => AddStep("user pause", () => Player.ExitViaPause()); private void resume() => AddStep("resume", () => Player.Resume()); private void confirmPauseOverlayShown(bool isShown) =>