osu/osu.Desktop.VisualTests/Platform/TestStorage.cs

29 lines
873 B
C#
Raw Normal View History

2016-12-06 09:56:20 +00:00
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework;
2016-10-25 14:44:43 +00:00
using osu.Framework.Desktop.Platform;
using SQLite.Net;
using SQLite.Net.Interop;
2016-11-14 09:54:24 +00:00
using SQLite.Net.Platform.Generic;
using SQLite.Net.Platform.Win32;
namespace osu.Desktop.VisualTests.Platform
2016-10-25 14:44:43 +00:00
{
public class TestStorage : DesktopStorage
{
public TestStorage(string baseName) : base(baseName)
{
}
public override SQLiteConnection GetDatabase(string name)
{
ISQLitePlatform platform;
if (RuntimeInfo.IsWindows)
platform = new SQLitePlatformWin32();
else
platform = new SQLitePlatformGeneric();
return new SQLiteConnection(platform, $@":memory:");
}
}
}