mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Remove "test container", make everything go through OnlinePlayTestScene
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
// 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.
|
||||
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Screens.OnlinePlay;
|
||||
using osu.Game.Tests.Visual.OnlinePlay;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public interface IMultiplayerRoomTestDependencies : IRoomTestDependencies
|
||||
{
|
||||
/// <summary>
|
||||
/// The cached <see cref="MultiplayerClient"/>.
|
||||
/// </summary>
|
||||
TestMultiplayerClient Client { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The cached <see cref="IRoomManager"/>.
|
||||
/// </summary>
|
||||
new TestMultiplayerRoomManager RoomManager { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
// 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.
|
||||
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Screens.OnlinePlay;
|
||||
using osu.Game.Tests.Visual.OnlinePlay;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public class MultiplayerRoomTestDependencies : RoomTestDependencies, IMultiplayerRoomTestDependencies
|
||||
{
|
||||
public TestMultiplayerClient Client { get; }
|
||||
public new TestMultiplayerRoomManager RoomManager => (TestMultiplayerRoomManager)base.RoomManager;
|
||||
|
||||
public MultiplayerRoomTestDependencies()
|
||||
{
|
||||
Client = new TestMultiplayerClient(RoomManager);
|
||||
CacheAs<MultiplayerClient>(Client);
|
||||
}
|
||||
|
||||
protected override IRoomManager CreateRoomManager() => new TestMultiplayerRoomManager();
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
// 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.
|
||||
|
||||
using osu.Game.Tests.Visual.OnlinePlay;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public class MultiplayerSubScreenTestScene : OnlinePlayTestScene, IMultiplayerRoomTestDependencies
|
||||
{
|
||||
public TestMultiplayerClient Client => RoomDependencies.Client;
|
||||
public new TestMultiplayerRoomManager RoomManager => RoomDependencies.RoomManager;
|
||||
|
||||
protected new MultiplayerRoomTestDependencies RoomDependencies => (MultiplayerRoomTestDependencies)base.RoomDependencies;
|
||||
|
||||
protected override RoomTestDependencies CreateRoomDependencies() => new MultiplayerRoomTestDependencies();
|
||||
}
|
||||
}
|
@ -8,11 +8,10 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Screens.OnlinePlay;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
using osu.Game.Tests.Visual.OnlinePlay;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public class TestMultiplayerRoomContainer : TestRoomContainer
|
||||
public class TestMultiplayerRoomContainer : Container
|
||||
{
|
||||
protected override Container<Drawable> Content => content;
|
||||
private readonly Container content;
|
||||
|
Reference in New Issue
Block a user