1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

Refactor test a bit

This commit is contained in:
smoogipoo 2021-08-17 09:45:10 +09:00
parent b672d4b936
commit 5214731dc1

View File

@ -44,6 +44,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
private TestMultiplayer multiplayerScreen;
private TestMultiplayerClient client;
private TestRequestHandlingMultiplayerRoomManager roomManager => multiplayerScreen.RoomManager;
[Cached(typeof(UserLookupCache))]
private UserLookupCache lookupCache = new TestUserLookupCache();
@ -68,7 +70,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddStep("load dependencies", () =>
{
client = new TestMultiplayerClient(multiplayerScreen.RoomManager);
client = new TestMultiplayerClient(roomManager);
// The screen gets suspended so it stops receiving updates.
Child = client;
@ -134,7 +136,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
AddStep("create room", () =>
{
multiplayerScreen.RoomManager.AddServerSideRoom(new Room
roomManager.AddServerSideRoom(new Room
{
Name = { Value = "Test Room" },
Playlist =
@ -164,7 +166,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
AddStep("create room", () =>
{
multiplayerScreen.RoomManager.AddServerSideRoom(new Room
roomManager.AddServerSideRoom(new Room
{
Name = { Value = "Test Room" },
Playlist =
@ -213,7 +215,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
AddStep("create room", () =>
{
multiplayerScreen.RoomManager.AddServerSideRoom(new Room
roomManager.AddServerSideRoom(new Room
{
Name = { Value = "Test Room" },
Password = { Value = "password" },