Move UserLookupCache to online play test dependencies

This commit is contained in:
Dan Balasescu
2022-02-15 20:56:46 +09:00
parent b2276baf71
commit c48a0dc993
8 changed files with 13 additions and 14 deletions

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Database;
using osu.Game.Online.Rooms;
using osu.Game.Overlays;
using osu.Game.Screens.OnlinePlay;
@ -22,6 +23,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
public OngoingOperationTracker OngoingOperationTracker { get; }
public OnlinePlayBeatmapAvailabilityTracker AvailabilityTracker { get; }
public TestRoomRequestsHandler RequestsHandler { get; }
public TestUserLookupCache UserLookupCache { get; }
/// <summary>
/// All cached dependencies which are also <see cref="Drawable"/> components.
@ -38,6 +40,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
OngoingOperationTracker = new OngoingOperationTracker();
AvailabilityTracker = new OnlinePlayBeatmapAvailabilityTracker();
RoomManager = CreateRoomManager();
UserLookupCache = new TestUserLookupCache();
dependencies = new DependencyContainer(new CachedModelDependencyContainer<Room>(null) { Model = { BindTarget = SelectedRoom } });
@ -47,6 +50,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
CacheAs(OngoingOperationTracker);
CacheAs(AvailabilityTracker);
CacheAs(new OverlayColourProvider(OverlayColourScheme.Plum));
CacheAs<UserLookupCache>(UserLookupCache);
}
public object Get(Type type)