2020-09-07 09:47:14 +00: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.
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
using osu.Framework.Allocation;
|
2021-08-28 17:09:35 +00:00
|
|
|
using osu.Framework.Graphics.Containers;
|
2021-11-11 19:42:33 +00:00
|
|
|
using osu.Game.Overlays;
|
2021-09-05 04:40:58 +00:00
|
|
|
using osu.Game.Rulesets;
|
|
|
|
using osu.Game.Rulesets.Catch;
|
2020-09-07 09:47:14 +00:00
|
|
|
using osu.Game.Rulesets.Edit;
|
2021-09-05 04:40:58 +00:00
|
|
|
using osu.Game.Rulesets.Mania;
|
|
|
|
using osu.Game.Rulesets.Osu;
|
2020-09-07 09:47:14 +00:00
|
|
|
using osu.Game.Rulesets.Osu.Beatmaps;
|
2021-09-05 04:40:58 +00:00
|
|
|
using osu.Game.Rulesets.Taiko;
|
2020-09-07 09:47:14 +00:00
|
|
|
using osu.Game.Screens.Edit;
|
|
|
|
using osu.Game.Screens.Edit.Setup;
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Editing
|
|
|
|
{
|
|
|
|
[TestFixture]
|
|
|
|
public class TestSceneSetupScreen : EditorClockTestScene
|
|
|
|
{
|
|
|
|
[Cached(typeof(EditorBeatmap))]
|
|
|
|
[Cached(typeof(IBeatSnapProvider))]
|
|
|
|
private readonly EditorBeatmap editorBeatmap;
|
|
|
|
|
2021-11-11 19:42:33 +00:00
|
|
|
[Cached]
|
|
|
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
|
|
|
|
2020-09-07 09:47:14 +00:00
|
|
|
public TestSceneSetupScreen()
|
|
|
|
{
|
|
|
|
editorBeatmap = new EditorBeatmap(new OsuBeatmap());
|
|
|
|
}
|
|
|
|
|
2021-09-05 04:40:58 +00:00
|
|
|
[Test]
|
|
|
|
public void TestOsu() => runForRuleset(new OsuRuleset().RulesetInfo);
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestTaiko() => runForRuleset(new TaikoRuleset().RulesetInfo);
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestCatch() => runForRuleset(new CatchRuleset().RulesetInfo);
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestMania() => runForRuleset(new ManiaRuleset().RulesetInfo);
|
2021-08-28 17:09:35 +00:00
|
|
|
|
2021-09-05 04:40:58 +00:00
|
|
|
private void runForRuleset(RulesetInfo rulesetInfo)
|
|
|
|
{
|
|
|
|
AddStep("create screen", () =>
|
2021-08-28 17:09:35 +00:00
|
|
|
{
|
2021-09-05 04:40:58 +00:00
|
|
|
editorBeatmap.BeatmapInfo.Ruleset = rulesetInfo;
|
|
|
|
|
|
|
|
Beatmap.Value = CreateWorkingBeatmap(editorBeatmap.PlayableBeatmap);
|
|
|
|
|
|
|
|
Child = new SetupScreen
|
|
|
|
{
|
|
|
|
State = { Value = Visibility.Visible },
|
|
|
|
};
|
|
|
|
});
|
2020-09-07 09:47:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|