mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Set new room for each test iteration
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
// 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 NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
@ -10,13 +11,9 @@ namespace osu.Game.Tests.Visual
|
||||
public abstract class MultiplayerTestScene : ScreenTestScene
|
||||
{
|
||||
[Cached]
|
||||
private readonly Bindable<Room> currentRoom = new Bindable<Room>();
|
||||
private readonly Bindable<Room> currentRoom = new Bindable<Room>(new Room());
|
||||
|
||||
protected Room Room
|
||||
{
|
||||
get => currentRoom.Value;
|
||||
set => currentRoom.Value = value;
|
||||
}
|
||||
protected Room Room => currentRoom.Value;
|
||||
|
||||
private CachedModelDependencyContainer<Room> dependencies;
|
||||
|
||||
@ -26,5 +23,11 @@ namespace osu.Game.Tests.Visual
|
||||
dependencies.Model.BindTo(currentRoom);
|
||||
return dependencies;
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void Setup() => Schedule(() =>
|
||||
{
|
||||
Room.CopyFrom(new Room());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user