mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:12:57 +08:00
Change multiplayer tests to have null room by default
This commit is contained in:
parent
115bb40816
commit
25ddc5784d
@ -16,7 +16,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup() => Schedule(() =>
|
public void Setup() => Schedule(() =>
|
||||||
{
|
{
|
||||||
Room.CopyFrom(new Room());
|
Room = new Room();
|
||||||
|
|
||||||
Child = new RoomInfo
|
Child = new RoomInfo
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup() => Schedule(() =>
|
public void Setup() => Schedule(() =>
|
||||||
{
|
{
|
||||||
Room.Playlist.Clear();
|
Room = new Room();
|
||||||
|
|
||||||
Child = new MatchBeatmapDetailArea
|
Child = new MatchBeatmapDetailArea
|
||||||
{
|
{
|
||||||
|
@ -14,6 +14,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
public TestSceneMatchHeader()
|
public TestSceneMatchHeader()
|
||||||
{
|
{
|
||||||
|
Room = new Room();
|
||||||
Room.Playlist.Add(new PlaylistItem
|
Room.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap =
|
Beatmap =
|
||||||
|
@ -6,6 +6,7 @@ using Newtonsoft.Json;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -18,7 +19,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
|
|
||||||
public TestSceneMatchLeaderboard()
|
public TestSceneMatchLeaderboard()
|
||||||
{
|
{
|
||||||
Room.RoomID.Value = 3;
|
Room = new Room { RoomID = { Value = 3 } };
|
||||||
|
|
||||||
Add(new MatchLeaderboard
|
Add(new MatchLeaderboard
|
||||||
{
|
{
|
||||||
|
@ -14,6 +14,7 @@ using osu.Framework.Platform;
|
|||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
using osu.Game.Screens.Multi.Components;
|
using osu.Game.Screens.Multi.Components;
|
||||||
@ -95,7 +96,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup() => Schedule(() =>
|
public void Setup() => Schedule(() =>
|
||||||
{
|
{
|
||||||
Room.Playlist.Clear();
|
Room = new Room();
|
||||||
});
|
});
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -48,7 +48,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup() => Schedule(() =>
|
public void Setup() => Schedule(() =>
|
||||||
{
|
{
|
||||||
Room.CopyFrom(new Room());
|
Room = new Room();
|
||||||
});
|
});
|
||||||
|
|
||||||
[SetUpSteps]
|
[SetUpSteps]
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Screens.Multi.Components;
|
using osu.Game.Screens.Multi.Components;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
@ -12,10 +13,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
protected override bool UseOnlineAPI => true;
|
protected override bool UseOnlineAPI => true;
|
||||||
|
|
||||||
public TestSceneOverlinedParticipants()
|
[SetUp]
|
||||||
|
public void Setup() => Schedule(() =>
|
||||||
{
|
{
|
||||||
Room.RoomID.Value = 7;
|
Room = new Room { RoomID = { Value = 7 } };
|
||||||
}
|
});
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestHorizontalLayout()
|
public void TestHorizontalLayout()
|
||||||
|
@ -16,6 +16,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
|
|
||||||
public TestSceneOverlinedPlaylist()
|
public TestSceneOverlinedPlaylist()
|
||||||
{
|
{
|
||||||
|
Room = new Room { RoomID = { Value = 7 } };
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
Room.Playlist.Add(new PlaylistItem
|
Room.Playlist.Add(new PlaylistItem
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Screens.Multi.Components;
|
using osu.Game.Screens.Multi.Components;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Multiplayer
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
@ -10,10 +12,14 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
protected override bool UseOnlineAPI => true;
|
protected override bool UseOnlineAPI => true;
|
||||||
|
|
||||||
|
[SetUp]
|
||||||
|
public void Setup() => Schedule(() =>
|
||||||
|
{
|
||||||
|
Room = new Room { RoomID = { Value = 7 } };
|
||||||
|
});
|
||||||
|
|
||||||
public TestSceneParticipantsList()
|
public TestSceneParticipantsList()
|
||||||
{
|
{
|
||||||
Room.RoomID.Value = 7;
|
|
||||||
|
|
||||||
Add(new ParticipantsList { RelativeSizeAxes = Axes.Both });
|
Add(new ParticipantsList { RelativeSizeAxes = Axes.Both });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
public abstract class MultiplayerTestScene : ScreenTestScene
|
public abstract class MultiplayerTestScene : ScreenTestScene
|
||||||
{
|
{
|
||||||
[Cached]
|
[Cached]
|
||||||
private readonly Bindable<Room> currentRoom = new Bindable<Room>(new Room());
|
private readonly Bindable<Room> currentRoom = new Bindable<Room>();
|
||||||
|
|
||||||
protected Room Room
|
protected Room Room
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user