mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Fix failing test cases
This commit is contained in:
@ -2,26 +2,20 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public class MultiplayerTestCase : OsuTestCase
|
||||
{
|
||||
private Room room;
|
||||
[Cached]
|
||||
private readonly Bindable<Room> currentRoom = new Bindable<Room>(new Room());
|
||||
|
||||
protected Room Room
|
||||
{
|
||||
get => room;
|
||||
set
|
||||
{
|
||||
if (room == value)
|
||||
return;
|
||||
room = value;
|
||||
|
||||
if (dependencies != null)
|
||||
dependencies.Model.Value = value;
|
||||
}
|
||||
get => currentRoom;
|
||||
set => currentRoom.Value = value;
|
||||
}
|
||||
|
||||
private CachedModelDependencyContainer<Room> dependencies;
|
||||
@ -29,7 +23,7 @@ namespace osu.Game.Tests.Visual
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
dependencies = new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent));
|
||||
dependencies.Model.Value = room;
|
||||
dependencies.Model.BindTo(currentRoom);
|
||||
return dependencies;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user