Add the ability for tests to alter the room and user states which during testing

This commit is contained in:
Dean Herbert
2021-08-09 16:44:50 +09:00
parent 0fa1f085df
commit 1e5d9003d3
3 changed files with 27 additions and 13 deletions

View File

@ -20,6 +20,7 @@ using osu.Game.Scoring;
using osu.Game.Screens.Play.HUD;
using osu.Game.Tests.Visual.OnlinePlay;
using osu.Game.Tests.Visual.Spectator;
using osu.Game.Users;
namespace osu.Game.Tests.Visual.Multiplayer
{
@ -53,7 +54,10 @@ namespace osu.Game.Tests.Visual.Multiplayer
var playable = Beatmap.Value.GetPlayableBeatmap(Ruleset.Value);
foreach (var user in users)
{
SpectatorClient.StartPlay(user, Beatmap.Value.BeatmapInfo.OnlineBeatmapID ?? 0);
OnlinePlayDependencies.Client.AddUser(new User { Id = user });
}
// Todo: This is REALLY bad.
Client.CurrentMatchPlayingUserIds.AddRange(users);