Swap to dapper and system.text.json for database backend

This commit is contained in:
ta264
2019-12-15 15:04:42 +00:00
parent 7b17c3e36c
commit d2065bfa1b
155 changed files with 2333 additions and 2340 deletions

View File

@@ -7,6 +7,8 @@ using NzbDrone.Core.Lifecycle;
using NzbDrone.Core.Messaging.Events;
using Radarr.Host;
using NzbDrone.Test.Common;
using NzbDrone.Core.CustomFormats;
using System.Collections.Generic;
namespace NzbDrone.Common.Test
{
@@ -20,6 +22,11 @@ namespace NzbDrone.Common.Test
container.Register<IMainDatabase>(new MainDatabase(null));
container.Resolve<IAppFolderFactory>().Register();
// A dummy custom format repository since this isn't a DB test
var mockCustomFormat = Mocker.GetMock<ICustomFormatRepository>();
mockCustomFormat.Setup(x => x.All()).Returns(new List<CustomFormatDefinition>());
container.Register<ICustomFormatRepository>(mockCustomFormat.Object);
Mocker.SetConstant(container);
var handlers = Subject.BuildAll<IHandle<ApplicationStartedEvent>>()
@@ -28,4 +35,4 @@ namespace NzbDrone.Common.Test
handlers.Should().OnlyHaveUniqueItems();
}
}
}
}