1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-17 00:52:55 +08:00
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneFirstRunScreenImportFromStable.cs

49 lines
1.6 KiB
C#
Raw Normal View History

2023-06-23 00:37:25 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2022-05-17 17:15:14 +08:00
// See the LICENCE file in the repository root for full licence text.
using System.Threading;
using System.Threading.Tasks;
using Moq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Screens;
using osu.Framework.Utils;
using osu.Game.Database;
using osu.Game.Overlays;
using osu.Game.Overlays.FirstRunSetup;
namespace osu.Game.Tests.Visual.UserInterface
{
2022-11-24 13:32:20 +08:00
public partial class TestSceneFirstRunScreenImportFromStable : OsuManualInputManagerTestScene
2022-05-17 17:15:14 +08:00
{
[Cached]
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
private readonly Mock<LegacyImportManager> legacyImportManager = new Mock<LegacyImportManager>();
[BackgroundDependencyLoader]
private void load()
{
legacyImportManager.Setup(m => m.GetImportCount(It.IsAny<StableContent>(), It.IsAny<CancellationToken>())).Returns(() => Task.FromResult(RNG.Next(0, 256)));
Dependencies.CacheAs(legacyImportManager.Object);
}
public TestSceneFirstRunScreenImportFromStable()
{
AddStep("load screen", () =>
{
Child = new PopoverContainer
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new ScreenStack(new ScreenImportFromStable())
}
};
});
}
}
}