1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00

Move test request handling earlier in setup

This commit is contained in:
Dan Balasescu 2022-02-15 23:42:37 +09:00
parent bdc3b76df0
commit 48573d2401

View File

@ -60,14 +60,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
drawableDependenciesContainer.Clear();
dependencies.OnlinePlayDependencies = CreateOnlinePlayDependencies();
drawableDependenciesContainer.AddRange(OnlinePlayDependencies.DrawableComponents);
});
public override void SetUpSteps()
{
base.SetUpSteps();
AddStep("setup API", () =>
{
var handler = OnlinePlayDependencies.RequestsHandler;
// Resolving the BeatmapManager in the test scene will inject the game-wide BeatmapManager, while many test scenes cache their own BeatmapManager instead.
@ -76,7 +69,6 @@ namespace osu.Game.Tests.Visual.OnlinePlay
((DummyAPIAccess)API).HandleRequest = request => handler.HandleRequest(request, API.LocalUser.Value, beatmapManager);
});
}
/// <summary>
/// Creates the room dependencies. Called every <see cref="Setup"/>.