// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Online.Rooms; namespace osu.Game.Tests.Visual.OnlinePlay { /// /// Contains a that is resolvable by components in test scenes. /// public class TestRoomContainer : Container { /// /// The cached . /// public readonly Room Room = new Room(); public TestRoomContainer() { RelativeSizeAxes = Axes.Both; } protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) { var dependencies = new DependencyContainer( new CachedModelDependencyContainer(parent) { Model = { Value = Room } }); dependencies.Cache(new Bindable(Room)); return dependencies; } } }