2022-03-09 16:38:56 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2022-03-09 16:38:56 +08:00
|
|
|
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
|
|
|
|
{
|
|
|
|
Beatmap = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo).Beatmap,
|
|
|
|
Mod = new UnknownMod("WNG"),
|
|
|
|
PassCondition = () => Player.IsLoaded && !Player.LoadedBeatmapSuccessfully
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|