-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test coverage ensuring unique acronyms
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
osu.Game.Tests/Visual/Gameplay/TestSceneNoConflictingModAcronyms.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// 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. | ||
|
||
#nullable disable | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using NUnit.Framework; | ||
using osu.Framework.Testing; | ||
|
||
namespace osu.Game.Tests.Visual.Gameplay | ||
{ | ||
[HeadlessTest] | ||
public class TestSceneNoConflictingModAcronyms : TestSceneAllRulesetPlayers | ||
{ | ||
protected override void AddCheckSteps() | ||
{ | ||
AddStep("Check all mod acronyms are unique", () => | ||
{ | ||
var mods = Ruleset.Value.CreateInstance().AllMods; | ||
|
||
IEnumerable<string> acronyms = mods.Select(m => m.Acronym); | ||
|
||
Assert.That(acronyms, Is.Unique); | ||
}); | ||
} | ||
} | ||
} |