mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Fix more incorrect test access to ILive
This commit is contained in:
@ -34,7 +34,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
|
|
||||||
private TestPlaylistsRoomSubScreen match;
|
private TestPlaylistsRoomSubScreen match;
|
||||||
|
|
||||||
private ILive<BeatmapSetInfo> importedBeatmap;
|
private BeatmapSetInfo importedBeatmap;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(GameHost host, AudioManager audio)
|
private void load(GameHost host, AudioManager audio)
|
||||||
@ -65,7 +65,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
room.EndDate.Value = DateTimeOffset.Now.AddMinutes(5);
|
room.EndDate.Value = DateTimeOffset.Now.AddMinutes(5);
|
||||||
room.Playlist.Add(new PlaylistItem
|
room.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = importedBeatmap.Value.Beatmaps.First() },
|
Beatmap = { Value = importedBeatmap.Beatmaps.First() },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -88,7 +88,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
room.EndDate.Value = DateTimeOffset.Now.AddMinutes(5);
|
room.EndDate.Value = DateTimeOffset.Now.AddMinutes(5);
|
||||||
room.Playlist.Add(new PlaylistItem
|
room.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = importedBeatmap.Value.Beatmaps.First() },
|
Beatmap = { Value = importedBeatmap.Beatmaps.First() },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -105,7 +105,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
room.Host.Value = API.LocalUser.Value;
|
room.Host.Value = API.LocalUser.Value;
|
||||||
room.Playlist.Add(new PlaylistItem
|
room.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = importedBeatmap.Value.Beatmaps.First() },
|
Beatmap = { Value = importedBeatmap.Beatmaps.First() },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -122,9 +122,9 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
|
|
||||||
AddStep("store real beatmap values", () =>
|
AddStep("store real beatmap values", () =>
|
||||||
{
|
{
|
||||||
realHash = importedBeatmap.Value.Beatmaps[0].MD5Hash;
|
realHash = importedBeatmap.Beatmaps[0].MD5Hash;
|
||||||
realOnlineId = importedBeatmap.Value.Beatmaps[0].OnlineID;
|
realOnlineId = importedBeatmap.Beatmaps[0].OnlineID;
|
||||||
realOnlineSetId = importedBeatmap.Value.OnlineID;
|
realOnlineSetId = importedBeatmap.OnlineID;
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep("import modified beatmap", () =>
|
AddStep("import modified beatmap", () =>
|
||||||
@ -134,6 +134,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
BeatmapInfo =
|
BeatmapInfo =
|
||||||
{
|
{
|
||||||
OnlineID = realOnlineId,
|
OnlineID = realOnlineId,
|
||||||
|
Metadata = new BeatmapMetadata(),
|
||||||
BeatmapSet =
|
BeatmapSet =
|
||||||
{
|
{
|
||||||
OnlineID = realOnlineSetId
|
OnlineID = realOnlineSetId
|
||||||
@ -160,6 +161,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
{
|
{
|
||||||
MD5Hash = realHash,
|
MD5Hash = realHash,
|
||||||
OnlineID = realOnlineId,
|
OnlineID = realOnlineId,
|
||||||
|
Metadata = new BeatmapMetadata(),
|
||||||
BeatmapSet = new BeatmapSetInfo
|
BeatmapSet = new BeatmapSetInfo
|
||||||
{
|
{
|
||||||
OnlineID = realOnlineSetId,
|
OnlineID = realOnlineSetId,
|
||||||
@ -211,7 +213,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
|
|
||||||
Debug.Assert(beatmap.BeatmapInfo.BeatmapSet != null);
|
Debug.Assert(beatmap.BeatmapInfo.BeatmapSet != null);
|
||||||
|
|
||||||
importedBeatmap = manager.Import(beatmap.BeatmapInfo.BeatmapSet).GetResultSafely();
|
importedBeatmap = manager.Import(beatmap.BeatmapInfo.BeatmapSet).GetResultSafely()?.Value.Detach();
|
||||||
});
|
});
|
||||||
|
|
||||||
private class TestPlaylistsRoomSubScreen : PlaylistsRoomSubScreen
|
private class TestPlaylistsRoomSubScreen : PlaylistsRoomSubScreen
|
||||||
|
Reference in New Issue
Block a user