mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 11:48:26 -07:00
TestDbHelper cleanup
This commit is contained in:
parent
1b45a85f3f
commit
ed566e6e9a
2 changed files with 25 additions and 28 deletions
|
@ -16,9 +16,9 @@ namespace NzbDrone.Core.Test.Framework
|
|||
{
|
||||
private const string DB_TEMPLATE_NAME = "_dbtemplate.sdf";
|
||||
|
||||
public static string ConnectionString { get; private set; }
|
||||
internal static string ConnectionString { get; private set; }
|
||||
|
||||
public static IDatabase GetEmptyDatabase(bool enableLogging = false, string fileName = "")
|
||||
internal static IDatabase GetEmptyDatabase(bool enableLogging = false, string fileName = "")
|
||||
{
|
||||
Console.WriteLine("====================DataBase====================");
|
||||
Console.WriteLine("Cloning database from template.");
|
||||
|
@ -41,21 +41,12 @@ namespace NzbDrone.Core.Test.Framework
|
|||
return database;
|
||||
}
|
||||
|
||||
public static void CreateDataBaseTemplate()
|
||||
internal static void CreateDataBaseTemplate()
|
||||
{
|
||||
Console.WriteLine("Creating an empty PetaPoco database");
|
||||
var connectionString = Connection.GetConnectionString(DB_TEMPLATE_NAME);
|
||||
var database = Connection.GetPetaPocoDb(connectionString);
|
||||
database.Dispose();
|
||||
}
|
||||
|
||||
public static Series GetFakeSeries(int id, string title)
|
||||
{
|
||||
return Builder<Series>.CreateNew()
|
||||
.With(c => c.SeriesId = id)
|
||||
.With(c => c.Title = title)
|
||||
.With(c => c.CleanTitle = Parser.NormalizeTitle(title))
|
||||
.Build();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue