1
0
mirror of https://github.com/ppy/osu.git synced 2024-10-01 21:17:26 +08:00
osu-lazer/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayer.cs

34 lines
1.1 KiB
C#
Raw Normal View History

2020-12-21 17:42:31 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2021-03-03 20:54:34 +08:00
using osu.Framework.Allocation;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.OnlinePlay.Components;
2020-12-21 17:42:31 +08:00
namespace osu.Game.Tests.Visual.Multiplayer
2020-12-21 17:42:31 +08:00
{
2021-03-03 20:54:34 +08:00
public class TestSceneMultiplayer : ScreenTestScene
2020-12-21 17:42:31 +08:00
{
2020-12-25 12:38:11 +08:00
public TestSceneMultiplayer()
2020-12-21 17:42:31 +08:00
{
2020-12-25 12:38:11 +08:00
var multi = new TestMultiplayer();
2020-12-21 17:42:31 +08:00
AddStep("show", () => LoadScreen(multi));
AddUntilStep("wait for loaded", () => multi.IsLoaded);
}
2021-03-03 20:54:34 +08:00
private class TestMultiplayer : Screens.OnlinePlay.Multiplayer.Multiplayer
2020-12-24 04:00:47 +08:00
{
2021-03-03 20:54:34 +08:00
[Cached(typeof(StatefulMultiplayerClient))]
public readonly TestMultiplayerClient Client;
2020-12-24 04:00:47 +08:00
2021-03-03 20:54:34 +08:00
public TestMultiplayer()
{
AddInternal(Client = new TestMultiplayerClient((TestMultiplayerRoomManager)RoomManager));
}
2020-12-24 04:00:47 +08:00
2020-12-25 12:38:11 +08:00
protected override RoomManager CreateRoomManager() => new TestMultiplayerRoomManager();
2020-12-21 17:42:31 +08:00
}
}
}