Fix failing test cases

This commit is contained in:
smoogipoo
2019-02-08 16:02:14 +09:00
parent ee5ff283d1
commit 7aca0f4a1d
3 changed files with 12 additions and 29 deletions

View File

@ -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;
}
}