From 795a49098b77453d423cd3fcd6299dd6147df953 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Wed, 18 Jan 2023 22:34:29 +0800 Subject: [PATCH] Add the classic stage info into the test case for let the editor works. --- .../Edit/Stages/Classic/ClassicStageScreenTestScene.cs | 4 ++++ .../Edit/Stages/Classic/TestSceneClassicStageEditor.cs | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Stages/Classic/ClassicStageScreenTestScene.cs b/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Stages/Classic/ClassicStageScreenTestScene.cs index 37e3a6d8f..c57d484d6 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Stages/Classic/ClassicStageScreenTestScene.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Stages/Classic/ClassicStageScreenTestScene.cs @@ -8,6 +8,7 @@ using osu.Game.Overlays; using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Karaoke.Beatmaps; +using osu.Game.Rulesets.Karaoke.Beatmaps.Stages.Classic; using osu.Game.Rulesets.Karaoke.Screens.Edit.Stages.Classic; using osu.Game.Rulesets.Karaoke.Tests.Beatmaps; using osu.Game.Screens.Edit; @@ -49,6 +50,9 @@ protected virtual KaraokeBeatmap CreateBeatmap() if (new KaraokeBeatmapConverter(beatmap, new KaraokeRuleset()).Convert() is not KaraokeBeatmap karaokeBeatmap) throw new ArgumentNullException(nameof(karaokeBeatmap)); + // add classic stage info for testing purpose. + karaokeBeatmap.StageInfos.Add(new ClassicStageInfo()); + return karaokeBeatmap; } } diff --git a/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Stages/Classic/TestSceneClassicStageEditor.cs b/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Stages/Classic/TestSceneClassicStageEditor.cs index 32001cb9f..135838e00 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Stages/Classic/TestSceneClassicStageEditor.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Stages/Classic/TestSceneClassicStageEditor.cs @@ -7,6 +7,7 @@ using osu.Game.Overlays; using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Karaoke.Beatmaps; +using osu.Game.Rulesets.Karaoke.Beatmaps.Stages.Classic; using osu.Game.Rulesets.Karaoke.Screens.Edit.Stages.Classic; using osu.Game.Rulesets.Karaoke.Tests.Beatmaps; using osu.Game.Screens.Edit; @@ -29,6 +30,10 @@ public TestSceneClassicStageEditor() { var beatmap = new TestKaraokeBeatmap(new KaraokeRuleset().RulesetInfo); var karaokeBeatmap = new KaraokeBeatmapConverter(beatmap, new KaraokeRuleset()).Convert() as KaraokeBeatmap; + + // add classic stage info for testing purpose. + karaokeBeatmap!.StageInfos.Add(new ClassicStageInfo()); + editorBeatmap = new EditorBeatmap(karaokeBeatmap); }