mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 22:33:05 +08:00
Fix test failure due to TestMetadataClient
providing null statistics array
This commit is contained in:
parent
d75c170ba1
commit
5ebb5ad670
@ -29,6 +29,7 @@ namespace osu.Game.Tests.Visual.DailyChallenge
|
||||
private void load()
|
||||
{
|
||||
base.Content.Add(notificationOverlay);
|
||||
base.Content.Add(metadataClient);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -63,7 +64,7 @@ namespace osu.Game.Tests.Visual.DailyChallenge
|
||||
Name = { Value = "Daily Challenge: June 4, 2024" },
|
||||
Playlist =
|
||||
{
|
||||
new PlaylistItem(CreateAPIBeatmapSet().Beatmaps.First())
|
||||
new PlaylistItem(TestResources.CreateTestBeatmapSetInfo().Beatmaps.First())
|
||||
{
|
||||
RequiredMods = [new APIMod(new OsuModTraceable())],
|
||||
AllowedMods = [new APIMod(new OsuModDoubleTime())]
|
||||
|
@ -88,7 +88,14 @@ namespace osu.Game.Tests.Visual.Metadata
|
||||
}
|
||||
|
||||
public override Task<MultiplayerPlaylistItemStats[]> BeginWatchingMultiplayerRoom(long id)
|
||||
=> Task.FromResult(new MultiplayerPlaylistItemStats[MultiplayerPlaylistItemStats.TOTAL_SCORE_DISTRIBUTION_BINS]);
|
||||
{
|
||||
var stats = new MultiplayerPlaylistItemStats[MultiplayerPlaylistItemStats.TOTAL_SCORE_DISTRIBUTION_BINS];
|
||||
|
||||
for (int i = 0; i < stats.Length; i++)
|
||||
stats[i] = new MultiplayerPlaylistItemStats { PlaylistItemID = i };
|
||||
|
||||
return Task.FromResult(stats);
|
||||
}
|
||||
|
||||
public override Task EndWatchingMultiplayerRoom(long id) => Task.CompletedTask;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user