1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-23 04:02:57 +08:00
osu-lazer/osu.Game.Tournament.Tests/TournamentTestScene.cs

29 lines
1.0 KiB
C#
Raw Normal View History

2019-07-30 06:23:25 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Testing;
using osu.Game.Tests.Visual;
namespace osu.Game.Tournament.Tests
{
public abstract class TournamentTestScene : OsuTestScene
{
protected override ITestSceneTestRunner CreateRunner() => new TournamentTestSceneTestRunner();
public class TournamentTestSceneTestRunner : TournamentGameBase, ITestSceneTestRunner
{
private TestSceneTestRunner.TestRunner runner;
protected override void LoadAsyncComplete()
{
// this has to be run here rather than LoadComplete because
// TestScene.cs is checking the IsLoaded state (on another thread) and expects
// the runner to be loaded at that point.
Add(runner = new TestSceneTestRunner.TestRunner());
}
public void RunTestBlocking(TestScene test) => runner.RunTestBlocking(test);
}
}
}