Construct DllResourceStore with assemblies

This commit is contained in:
Huo Yaoyuan
2019-12-28 21:13:18 +08:00
parent 6cb1a638b6
commit 1b33581667
5 changed files with 8 additions and 6 deletions

View File

@ -4,16 +4,17 @@
using System.IO;
using NUnit.Framework;
using osu.Framework.IO.Stores;
using osu.Game.Resources;
namespace osu.Game.Tests.Resources
{
public static class TestResources
{
public static DllResourceStore GetStore() => new DllResourceStore("osu.Game.Tests.dll");
public static DllResourceStore GetStore() => new DllResourceStore(typeof(TestResources).Assembly);
public static Stream OpenResource(string name) => GetStore().GetStream($"Resources/{name}");
public static Stream GetTestBeatmapStream(bool virtualTrack = false) => new DllResourceStore("osu.Game.Resources.dll").GetStream($"Beatmaps/241526 Soleily - Renatus{(virtualTrack ? "_virtual" : "")}.osz");
public static Stream GetTestBeatmapStream(bool virtualTrack = false) => new DllResourceStore(OsuResources.ResourceAssembly).GetStream($"Beatmaps/241526 Soleily - Renatus{(virtualTrack ? "_virtual" : "")}.osz");
public static string GetTestBeatmapForImport(bool virtualTrack = false)
{