mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
RealtimeMultiplayer -> Multiplayer
This commit is contained in:
@ -4,14 +4,14 @@
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Screens.Multi;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public abstract class RoomManagerTestScene : MultiplayerTestScene
|
||||
public abstract class RoomManagerTestScene : RoomTestScene
|
||||
{
|
||||
[Cached(Type = typeof(IRoomManager))]
|
||||
protected TestRoomManager RoomManager { get; } = new TestRoomManager();
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
using System;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Multi;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
@ -13,7 +13,7 @@ using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
|
@ -4,7 +4,7 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Online.Multiplayer.RoomStatuses;
|
||||
using osu.Game.Online.Rooms.RoomStatuses;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Users;
|
||||
|
||||
|
@ -6,7 +6,7 @@ using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets.Catch;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
|
@ -5,7 +5,7 @@ using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
using NUnit.Framework;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
|
@ -3,16 +3,15 @@
|
||||
|
||||
using NUnit.Framework;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Tests.Visual.RealtimeMultiplayer;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public class TestSceneRealtimeMultiplayer : RealtimeMultiplayerTestScene
|
||||
public class TestSceneMultiplayer : MultiplayerTestScene
|
||||
{
|
||||
public TestSceneRealtimeMultiplayer()
|
||||
public TestSceneMultiplayer()
|
||||
{
|
||||
var multi = new TestRealtimeMultiplayer();
|
||||
var multi = new TestMultiplayer();
|
||||
|
||||
AddStep("show", () => LoadScreen(multi));
|
||||
AddUntilStep("wait for loaded", () => multi.IsLoaded);
|
||||
@ -40,9 +39,9 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddAssert("room has 1 user", () => Client.Room?.Users.Count == 1);
|
||||
}
|
||||
|
||||
private class TestRealtimeMultiplayer : Screens.Multi.RealtimeMultiplayer.RealtimeMultiplayer
|
||||
private class TestMultiplayer : Screens.Multi.Multiplayer.Multiplayer
|
||||
{
|
||||
protected override RoomManager CreateRoomManager() => new TestRealtimeRoomManager();
|
||||
protected override RoomManager CreateRoomManager() => new TestMultiplayerRoomManager();
|
||||
}
|
||||
}
|
||||
}
|
@ -5,21 +5,20 @@ using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Screens.Multi.RealtimeMultiplayer;
|
||||
using osu.Game.Screens.Multi.RealtimeMultiplayer.Match;
|
||||
using osu.Game.Screens.Multi.Multiplayer;
|
||||
using osu.Game.Screens.Multi.Multiplayer.Match;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
using osu.Game.Tests.Visual.RealtimeMultiplayer;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public class TestSceneRealtimeMatchSubScreen : RealtimeMultiplayerTestScene
|
||||
public class TestSceneMultiplayerMatchSubScreen : MultiplayerTestScene
|
||||
{
|
||||
private RealtimeMatchSubScreen screen;
|
||||
private MultiplayerMatchSubScreen screen;
|
||||
|
||||
public TestSceneRealtimeMatchSubScreen()
|
||||
public TestSceneMultiplayerMatchSubScreen()
|
||||
: base(false)
|
||||
{
|
||||
}
|
||||
@ -33,14 +32,14 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
[SetUpSteps]
|
||||
public void SetupSteps()
|
||||
{
|
||||
AddStep("load match", () => LoadScreen(screen = new RealtimeMatchSubScreen(Room)));
|
||||
AddStep("load match", () => LoadScreen(screen = new MultiplayerMatchSubScreen(Room)));
|
||||
AddUntilStep("wait for load", () => screen.IsCurrentScreen());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSettingValidity()
|
||||
{
|
||||
AddAssert("create button not enabled", () => !this.ChildrenOfType<RealtimeMatchSettingsOverlay.CreateOrUpdateButton>().Single().Enabled.Value);
|
||||
AddAssert("create button not enabled", () => !this.ChildrenOfType<MultiplayerMatchSettingsOverlay.CreateOrUpdateButton>().Single().Enabled.Value);
|
||||
|
||||
AddStep("set playlist", () =>
|
||||
{
|
||||
@ -51,7 +50,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
});
|
||||
});
|
||||
|
||||
AddAssert("create button enabled", () => this.ChildrenOfType<RealtimeMatchSettingsOverlay.CreateOrUpdateButton>().Single().Enabled.Value);
|
||||
AddAssert("create button enabled", () => this.ChildrenOfType<MultiplayerMatchSettingsOverlay.CreateOrUpdateButton>().Single().Enabled.Value);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -68,7 +67,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
AddStep("click create button", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(this.ChildrenOfType<RealtimeMatchSettingsOverlay.CreateOrUpdateButton>().Single());
|
||||
InputManager.MoveMouseTo(this.ChildrenOfType<MultiplayerMatchSettingsOverlay.CreateOrUpdateButton>().Single());
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
|
@ -7,15 +7,14 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Online.RealtimeMultiplayer;
|
||||
using osu.Game.Screens.Multi.RealtimeMultiplayer.Participants;
|
||||
using osu.Game.Tests.Visual.RealtimeMultiplayer;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Screens.Multi.Multiplayer.Participants;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public class TestSceneRealtimeMultiplayerParticipantsList : RealtimeMultiplayerTestScene
|
||||
public class TestSceneMultiplayerParticipantsList : MultiplayerTestScene
|
||||
{
|
||||
[SetUp]
|
||||
public new void Setup() => Schedule(() =>
|
@ -10,20 +10,19 @@ using osu.Framework.Platform;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.RealtimeMultiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Screens.Multi.RealtimeMultiplayer.Match;
|
||||
using osu.Game.Screens.Multi.Multiplayer.Match;
|
||||
using osu.Game.Tests.Resources;
|
||||
using osu.Game.Tests.Visual.RealtimeMultiplayer;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public class TestSceneRealtimeReadyButton : RealtimeMultiplayerTestScene
|
||||
public class TestSceneMultiplayerReadyButton : MultiplayerTestScene
|
||||
{
|
||||
private RealtimeReadyButton button;
|
||||
private MultiplayerReadyButton button;
|
||||
|
||||
private BeatmapManager beatmaps;
|
||||
private RulesetStore rulesets;
|
||||
@ -43,7 +42,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap);
|
||||
|
||||
Child = button = new RealtimeReadyButton
|
||||
Child = button = new MultiplayerReadyButton
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
@ -4,16 +4,15 @@
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Tests.Visual.RealtimeMultiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
[HeadlessTest]
|
||||
public class TestSceneRealtimeRoomManager : MultiplayerTestScene
|
||||
public class TestSceneMultiplayerRoomManager : MultiplayerTestScene
|
||||
{
|
||||
private TestRealtimeRoomContainer roomContainer;
|
||||
private TestRealtimeRoomManager roomManager => roomContainer.RoomManager;
|
||||
private TestMultiplayerRoomContainer roomContainer;
|
||||
private TestMultiplayerRoomManager roomManager => roomContainer.RoomManager;
|
||||
|
||||
[Test]
|
||||
public void TestPollsInitially()
|
||||
@ -137,9 +136,9 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddAssert("multiplayer room joined", () => roomContainer.Client.Room != null);
|
||||
}
|
||||
|
||||
private TestRealtimeRoomManager createRoomManager()
|
||||
private TestMultiplayerRoomManager createRoomManager()
|
||||
{
|
||||
Child = roomContainer = new TestRealtimeRoomContainer
|
||||
Child = roomContainer = new TestMultiplayerRoomContainer
|
||||
{
|
||||
RoomManager =
|
||||
{
|
@ -4,8 +4,8 @@
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Multiplayer.RoomStatuses;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Online.Rooms.RoomStatuses;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
@ -40,9 +40,9 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
}) { MatchingFilter = true },
|
||||
new DrawableRoom(new Room
|
||||
{
|
||||
Name = { Value = "Open (realtime)" },
|
||||
Name = { Value = "Open" },
|
||||
Status = { Value = new RoomStatusOpen() },
|
||||
Category = { Value = RoomCategory.Realtime }
|
||||
Category = { Value = RoomCategory.Multiplayer }
|
||||
}) { MatchingFilter = true },
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user