mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 11:02:57 +08:00
Update exporter test to use OsuStorage
This commit is contained in:
parent
0c0dcb1e15
commit
f0f3c53571
@ -12,6 +12,7 @@ using osu.Framework.Extensions.ObjectExtensions;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.IO;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using Realms;
|
||||
|
||||
@ -21,7 +22,9 @@ namespace osu.Game.Tests.Database
|
||||
public class LegacyModelExporterTest
|
||||
{
|
||||
private TestLegacyModelExporter legacyExporter = null!;
|
||||
private TemporaryNativeStorage storage = null!;
|
||||
|
||||
private OsuStorage storage = null!;
|
||||
private TemporaryNativeStorage underlyingStorage = null!;
|
||||
|
||||
private const string short_filename = "normal file name";
|
||||
|
||||
@ -31,7 +34,7 @@ namespace osu.Game.Tests.Database
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
storage = new TemporaryNativeStorage("export-storage");
|
||||
storage = new OsuStorage(new HeadlessGameHost(), underlyingStorage = new TemporaryNativeStorage("export-storage"));
|
||||
legacyExporter = new TestLegacyModelExporter(storage);
|
||||
}
|
||||
|
||||
@ -102,8 +105,8 @@ namespace osu.Game.Tests.Database
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
if (storage.IsNotNull())
|
||||
storage.Dispose();
|
||||
if (underlyingStorage.IsNotNull())
|
||||
underlyingStorage.Dispose();
|
||||
}
|
||||
|
||||
private class TestLegacyModelExporter : LegacyExporter<TestModel>
|
||||
|
Loading…
Reference in New Issue
Block a user