1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:47:26 +08:00

Fix tests.

This commit is contained in:
Lucas A 2020-08-07 10:17:11 +02:00
parent 71895964f4
commit f8ef53a62e

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Game.Configuration;
using osu.Game.Overlays;
using osu.Game.Rulesets;
@ -13,21 +12,25 @@ namespace osu.Game.Tests.Visual.Gameplay
{
private OverlayTestPlayer testPlayer;
[Resolved]
private OsuConfigManager config { get; set; }
public override void SetUpSteps()
{
AddStep("disable overlay activation during gameplay", () => config.Set(OsuSetting.GameplayDisableOverlayActivation, true));
AddStep("disable overlay activation during gameplay", () => LocalConfig.Set(OsuSetting.GameplayDisableOverlayActivation, true));
base.SetUpSteps();
}
[Test]
public void TestGameplayOverlayActivationSetting()
public void TestGameplayOverlayActivation()
{
AddAssert("activation mode is disabled", () => testPlayer.OverlayActivationMode == OverlayActivation.Disabled);
}
[Test]
public void TestGameplayOverlayActivationDisabled()
{
AddStep("enable overlay activation during gameplay", () => LocalConfig.Set(OsuSetting.GameplayDisableOverlayActivation, false));
AddAssert("activation mode is user triggered", () => testPlayer.OverlayActivationMode == OverlayActivation.UserTriggered);
}
[Test]
public void TestGameplayOverlayActivationPaused()
{