2017-02-07 12:59:30 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2017-02-07 12:52:19 +08:00
|
|
|
|
|
|
|
|
|
using osu.Framework;
|
|
|
|
|
using osu.Framework.Desktop.Platform;
|
|
|
|
|
using SQLite.Net;
|
|
|
|
|
using SQLite.Net.Interop;
|
|
|
|
|
using SQLite.Net.Platform.Generic;
|
|
|
|
|
using SQLite.Net.Platform.Win32;
|
|
|
|
|
|
|
|
|
|
namespace osu.Desktop.VisualTests.Platform
|
|
|
|
|
{
|
|
|
|
|
public class TestStorage : DesktopStorage
|
|
|
|
|
{
|
|
|
|
|
public TestStorage(string baseName) : base(baseName)
|
|
|
|
|
{
|
|
|
|
|
}
|
2017-04-06 16:21:18 +08:00
|
|
|
|
|
2017-02-07 12:52:19 +08:00
|
|
|
|
public override SQLiteConnection GetDatabase(string name)
|
|
|
|
|
{
|
|
|
|
|
ISQLitePlatform platform;
|
|
|
|
|
if (RuntimeInfo.IsWindows)
|
|
|
|
|
platform = new SQLitePlatformWin32();
|
|
|
|
|
else
|
|
|
|
|
platform = new SQLitePlatformGeneric();
|
2017-03-07 09:59:19 +08:00
|
|
|
|
return new SQLiteConnection(platform, @":memory:");
|
2017-02-07 12:52:19 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2016-10-25 22:44:43 +08:00
|
|
|
|
}
|