mirror of
https://github.com/ppy/osu
synced 2025-03-03 10:02:04 +00:00
Cleanup test
This commit is contained in:
parent
51e74687f8
commit
aaf5596f9c
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System.Linq;
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
@ -15,7 +14,6 @@ using osu.Game.Rulesets.Osu;
|
|||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.Ranking;
|
using osu.Game.Screens.Ranking;
|
||||||
using osu.Game.Screens.Ranking.Contracted;
|
using osu.Game.Screens.Ranking.Contracted;
|
||||||
using osu.Game.Tests.Beatmaps;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Ranking
|
namespace osu.Game.Tests.Visual.Ranking
|
||||||
@ -28,7 +26,7 @@ namespace osu.Game.Tests.Visual.Ranking
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestShowPanel()
|
public void TestShowPanel()
|
||||||
{
|
{
|
||||||
AddStep("show example score", () => showPanel(createTestBeatmap(), new TestScoreInfo(new OsuRuleset().RulesetInfo)));
|
AddStep("show example score", () => showPanel(CreateWorkingBeatmap(CreateBeatmap(new OsuRuleset().RulesetInfo)), new TestScoreInfo(new OsuRuleset().RulesetInfo)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showPanel(WorkingBeatmap workingBeatmap, ScoreInfo score)
|
private void showPanel(WorkingBeatmap workingBeatmap, ScoreInfo score)
|
||||||
@ -36,17 +34,6 @@ namespace osu.Game.Tests.Visual.Ranking
|
|||||||
Child = new ContractedPanelMiddleContentContainer(workingBeatmap, score);
|
Child = new ContractedPanelMiddleContentContainer(workingBeatmap, score);
|
||||||
}
|
}
|
||||||
|
|
||||||
private WorkingBeatmap createTestBeatmap()
|
|
||||||
{
|
|
||||||
var beatmap = new TestBeatmap(rulesetStore.GetRuleset(0));
|
|
||||||
beatmap.Metadata.Title = "Verrrrrrrrrrrrrrrrrrry looooooooooooooooooooooooong beatmap title";
|
|
||||||
beatmap.Metadata.Artist = "Verrrrrrrrrrrrrrrrrrry looooooooooooooooooooooooong beatmap artist";
|
|
||||||
|
|
||||||
return new TestWorkingBeatmap(beatmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool containsAny(string text, params string[] stringsToMatch) => stringsToMatch.Any(text.Contains);
|
|
||||||
|
|
||||||
private class ContractedPanelMiddleContentContainer : Container
|
private class ContractedPanelMiddleContentContainer : Container
|
||||||
{
|
{
|
||||||
[Cached]
|
[Cached]
|
||||||
|
Loading…
Reference in New Issue
Block a user