1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-22 22:16:13 -04:00

Added before migration hook, this can be used to insert "old" data into test Db

so data migration could be tested.
This commit is contained in:
Keivan Beigi
2014-12-02 11:21:43 -08:00
committed by Mark McDowall
parent 37a1398338
commit c7ed76f6d3
5 changed files with 51 additions and 20 deletions
+3 -4
View File
@@ -89,7 +89,6 @@ namespace NzbDrone.Core.Test.Framework
{
WithTempAsAppPath();
Mocker.SetConstant<IAnnouncer>(Mocker.Resolve<MigrationLogger>());
Mocker.SetConstant<IConnectionStringFactory>(Mocker.Resolve<ConnectionStringFactory>());
Mocker.SetConstant<IMigrationController>(Mocker.Resolve<MigrationController>());
@@ -97,9 +96,9 @@ namespace NzbDrone.Core.Test.Framework
MapRepository.Instance.EnableTraceLogging = true;
var factory = Mocker.Resolve<DbFactory>();
var _database = factory.Create(MigrationType);
_db = new TestDatabase(_database);
Mocker.SetConstant(_database);
var database = factory.Create(MigrationType);
_db = new TestDatabase(database);
Mocker.SetConstant(database);
}
[SetUp]