Merge pull request #15283 from peppy/test-api-beatmap-set

Add ability to make test `APIBeatmapSet`s from test scenes
This commit is contained in:
Dan Balasescu
2021-10-26 15:34:19 +09:00
committed by GitHub
3 changed files with 60 additions and 23 deletions

View File

@ -119,7 +119,7 @@ namespace osu.Game.Online.API.Requests.Responses
public string Tags { get; set; } = string.Empty;
[JsonProperty(@"beatmaps")]
private IEnumerable<APIBeatmap> beatmaps { get; set; } = Array.Empty<APIBeatmap>();
public IEnumerable<APIBeatmap> Beatmaps { get; set; } = Array.Empty<APIBeatmap>();
public virtual BeatmapSetInfo ToBeatmapSet(RulesetStore rulesets)
{
@ -131,7 +131,7 @@ namespace osu.Game.Online.API.Requests.Responses
OnlineInfo = this
};
beatmapSet.Beatmaps = beatmaps.Select(b =>
beatmapSet.Beatmaps = Beatmaps.Select(b =>
{
var beatmap = b.ToBeatmapInfo(rulesets);
beatmap.BeatmapSet = beatmapSet;
@ -156,7 +156,7 @@ namespace osu.Game.Online.API.Requests.Responses
#region Implementation of IBeatmapSetInfo
IEnumerable<IBeatmapInfo> IBeatmapSetInfo.Beatmaps => beatmaps;
IEnumerable<IBeatmapInfo> IBeatmapSetInfo.Beatmaps => Beatmaps;
IBeatmapMetadataInfo IBeatmapSetInfo.Metadata => metadata;