1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-26 22:56:23 -04:00
This commit is contained in:
Qstick
2021-08-03 00:43:28 -04:00
committed by Mark McDowall
parent 878d1561aa
commit 1c22a1ec0d
1201 changed files with 5620 additions and 4303 deletions
+7 -3
View File
@@ -41,7 +41,6 @@ namespace NzbDrone.Core.Test.Framework
return _subject;
}
}
}
@@ -57,7 +56,9 @@ namespace NzbDrone.Core.Test.Framework
get
{
if (_db == null)
{
throw new InvalidOperationException("Test object database doesn't exists. Make sure you call WithRealDb() if you intend to use an actual database.");
}
return _db;
}
@@ -78,6 +79,7 @@ namespace NzbDrone.Core.Test.Framework
Mocker.SetConstant<IMainDatabase>(mainDb);
break;
}
case MigrationType.Log:
{
var logDb = new LogDatabase(database);
@@ -85,6 +87,7 @@ namespace NzbDrone.Core.Test.Framework
Mocker.SetConstant<ILogDatabase>(logDb);
break;
}
default:
{
throw new ArgumentException("Invalid MigrationType");
@@ -100,6 +103,7 @@ namespace NzbDrone.Core.Test.Framework
{
Mocker.SetConstant<ILoggerProvider>(NullLoggerProvider.Instance);
}
protected void SetupContainer()
{
WithTempAsAppPath();
@@ -125,11 +129,11 @@ namespace NzbDrone.Core.Test.Framework
GC.Collect();
GC.WaitForPendingFinalizers();
SQLiteConnection.ClearAllPools();
if (TestFolderInfo != null)
{
DeleteTempFolder(TestFolderInfo.AppDataFolder);
}
}
}
}
}