mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
|
|
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.IO.Stores;
|
|
using osu.Framework.Platform;
|
|
using osu.Framework.Testing;
|
|
|
|
namespace osu.Framework.Tests.Visual
|
|
{
|
|
public abstract class FrameworkTestCase : TestCase
|
|
{
|
|
public override void RunTest()
|
|
{
|
|
using (var host = new HeadlessGameHost())
|
|
host.Run(new FrameworkTestCaseTestRunner(this));
|
|
}
|
|
|
|
private class FrameworkTestCaseTestRunner : TestCaseTestRunner
|
|
{
|
|
public FrameworkTestCaseTestRunner(TestCase testCase)
|
|
: base(testCase)
|
|
{
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load()
|
|
{
|
|
Resources.AddStore(new NamespacedResourceStore<byte[]>(new DllResourceStore(@"osu.Framework.Tests.exe"), "Resources"));
|
|
}
|
|
}
|
|
}
|
|
}
|