2017-02-07 04:59:30 +00: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 04:52:19 +00: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 08:21:18 +00:00
|
|
|
|
|
2017-02-07 04:52:19 +00:00
|
|
|
|
public override SQLiteConnection GetDatabase(string name)
|
|
|
|
|
{
|
|
|
|
|
ISQLitePlatform platform;
|
|
|
|
|
if (RuntimeInfo.IsWindows)
|
|
|
|
|
platform = new SQLitePlatformWin32();
|
|
|
|
|
else
|
|
|
|
|
platform = new SQLitePlatformGeneric();
|
2017-03-07 01:59:19 +00:00
|
|
|
|
return new SQLiteConnection(platform, @":memory:");
|
2017-02-07 04:52:19 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2016-10-25 14:44:43 +00:00
|
|
|
|
}
|