mirror of
https://github.com/ppy/osu
synced 2024-12-15 19:36:34 +00:00
fix: provide OverlayColourProvider
as a dep in tests
This commit is contained in:
parent
f331f92151
commit
dbc07bc6dc
@ -5,6 +5,7 @@ using System;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Profile.Header.Components;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Online
|
||||
@ -13,12 +14,20 @@ namespace osu.Game.Tests.Visual.Online
|
||||
public partial class TestSceneUserProfilePreviousUsernames : OsuTestScene
|
||||
{
|
||||
private PreviousUsernames container = null!;
|
||||
private OverlayColourProvider colourProvider = null!;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp() => Schedule(() =>
|
||||
{
|
||||
Child = container = new PreviousUsernames
|
||||
colourProvider = new OverlayColourProvider(OverlayColourScheme.Pink);
|
||||
Child = new DependencyProvidingContainer
|
||||
{
|
||||
Child = container = new PreviousUsernames
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
CachedDependencies = new (Type, object)[] { (typeof(OverlayColourProvider), colourProvider) },
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user