mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
Add test coverage for per-ruleset setup screens
This commit is contained in:
parent
1a26658ba4
commit
6e4efdd1b1
@ -4,8 +4,13 @@
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
|
using osu.Game.Rulesets.Catch;
|
||||||
using osu.Game.Rulesets.Edit;
|
using osu.Game.Rulesets.Edit;
|
||||||
|
using osu.Game.Rulesets.Mania;
|
||||||
|
using osu.Game.Rulesets.Osu;
|
||||||
using osu.Game.Rulesets.Osu.Beatmaps;
|
using osu.Game.Rulesets.Osu.Beatmaps;
|
||||||
|
using osu.Game.Rulesets.Taiko;
|
||||||
using osu.Game.Screens.Edit;
|
using osu.Game.Screens.Edit;
|
||||||
using osu.Game.Screens.Edit.Setup;
|
using osu.Game.Screens.Edit.Setup;
|
||||||
|
|
||||||
@ -23,15 +28,31 @@ namespace osu.Game.Tests.Visual.Editing
|
|||||||
editorBeatmap = new EditorBeatmap(new OsuBeatmap());
|
editorBeatmap = new EditorBeatmap(new OsuBeatmap());
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[Test]
|
||||||
private void load()
|
public void TestOsu() => runForRuleset(new OsuRuleset().RulesetInfo);
|
||||||
{
|
|
||||||
Beatmap.Value = CreateWorkingBeatmap(editorBeatmap.PlayableBeatmap);
|
|
||||||
|
|
||||||
Child = new SetupScreen
|
[Test]
|
||||||
|
public void TestTaiko() => runForRuleset(new TaikoRuleset().RulesetInfo);
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestCatch() => runForRuleset(new CatchRuleset().RulesetInfo);
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestMania() => runForRuleset(new ManiaRuleset().RulesetInfo);
|
||||||
|
|
||||||
|
private void runForRuleset(RulesetInfo rulesetInfo)
|
||||||
|
{
|
||||||
|
AddStep("create screen", () =>
|
||||||
{
|
{
|
||||||
State = { Value = Visibility.Visible },
|
editorBeatmap.BeatmapInfo.Ruleset = rulesetInfo;
|
||||||
};
|
|
||||||
|
Beatmap.Value = CreateWorkingBeatmap(editorBeatmap.PlayableBeatmap);
|
||||||
|
|
||||||
|
Child = new SetupScreen
|
||||||
|
{
|
||||||
|
State = { Value = Visibility.Visible },
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user