2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2022-03-09 16:38:56 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
using osu.Game.Rulesets.Mods;
|
|
|
|
|
using osu.Game.Rulesets.Osu;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Gameplay
|
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class TestSceneUnknownMod : ModTestScene
|
2022-03-09 16:38:56 +08:00
|
|
|
|
{
|
|
|
|
|
protected override Ruleset CreatePlayerRuleset() => new OsuRuleset();
|
|
|
|
|
|
2022-03-09 16:50:05 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// This test also covers the scenario of exiting Player after an unsuccessful beatmap load.
|
|
|
|
|
/// </summary>
|
2022-03-09 16:38:56 +08:00
|
|
|
|
[Test]
|
|
|
|
|
public void TestUnknownModDoesntEnterGameplay()
|
|
|
|
|
{
|
|
|
|
|
CreateModTest(new ModTestData
|
|
|
|
|
{
|
|
|
|
|
Mod = new UnknownMod("WNG"),
|
|
|
|
|
PassCondition = () => Player.IsLoaded && !Player.LoadedBeatmapSuccessfully
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|