Move "excess mods" test behaviour to local usages

There were only two of these, so it doesn't make sense to add extra
complexity in the test resources class.
This commit is contained in:
Dean Herbert
2021-12-13 16:41:29 +09:00
parent 99ac71c1fe
commit 654b47c7ec
3 changed files with 19 additions and 11 deletions

View File

@ -41,9 +41,15 @@ namespace osu.Game.Tests.Visual.Ranking
[Test]
public void TestExcessMods()
{
var author = new APIUser { Username = "mapper_name" };
AddStep("show excess mods score", () =>
{
var author = new APIUser { Username = "mapper_name" };
AddStep("show excess mods score", () => showPanel(TestResources.CreateTestScoreInfo(createTestBeatmap(author), true)));
var score = TestResources.CreateTestScoreInfo(createTestBeatmap(author));
score.Mods = score.BeatmapInfo.Ruleset.CreateInstance().CreateAllMods().ToArray();
showPanel(score);
});
AddAssert("mapper name present", () => this.ChildrenOfType<OsuSpriteText>().Any(spriteText => spriteText.Current.Value == "mapper_name"));
}