mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Make BeatmapSetOverlay accept nulls everywhere
This commit is contained in:
@ -8,6 +8,9 @@ using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.BeatmapSet;
|
||||
using osu.Game.Overlays.BeatmapSet.Buttons;
|
||||
using osu.Game.Overlays.BeatmapSet.Scores;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Users;
|
||||
|
||||
@ -18,6 +21,26 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
private readonly BeatmapSetOverlay overlay;
|
||||
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(Header),
|
||||
typeof(ClickableUsername),
|
||||
typeof(DrawableScore),
|
||||
typeof(DrawableTopScore),
|
||||
typeof(ScoresContainer),
|
||||
typeof(AuthorInfo),
|
||||
typeof(BasicStats),
|
||||
typeof(BeatmapPicker),
|
||||
typeof(Details),
|
||||
typeof(DownloadButton),
|
||||
typeof(FavouriteButton),
|
||||
typeof(Header),
|
||||
typeof(HeaderButton),
|
||||
typeof(Info),
|
||||
typeof(PreviewButton),
|
||||
typeof(SuccessRate),
|
||||
};
|
||||
|
||||
public TestCaseBeatmapSetOverlay()
|
||||
{
|
||||
Add(overlay = new BeatmapSetOverlay());
|
||||
@ -29,6 +52,10 @@ namespace osu.Game.Tests.Visual
|
||||
var mania = rulesets.GetRuleset(3);
|
||||
var taiko = rulesets.GetRuleset(1);
|
||||
|
||||
AddStep(@"show loading", () => overlay.ShowBeatmapSet(null));
|
||||
|
||||
AddStep(@"show online", () => overlay.FetchAndShowBeatmapSet(55));
|
||||
|
||||
AddStep(@"show first", () =>
|
||||
{
|
||||
overlay.ShowBeatmapSet(new BeatmapSetInfo
|
||||
|
Reference in New Issue
Block a user