mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
Hello Autofac, Goodbye Ninject
This commit is contained in:
parent
17d9d0cc4f
commit
924d3d0c8e
139 changed files with 473 additions and 572 deletions
|
@ -1,6 +1,6 @@
|
|||
using FluentAssertions;
|
||||
using Autofac;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using Ninject;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.App.Test
|
||||
|
@ -11,14 +11,14 @@ namespace NzbDrone.App.Test
|
|||
[Test]
|
||||
public void Kernel_can_get_kernel()
|
||||
{
|
||||
CentralDispatch.Kernel.Should().NotBeNull();
|
||||
CentralDispatch.Container.Should().NotBeNull();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Kernel_should_return_same_kernel()
|
||||
{
|
||||
var firstKernel = CentralDispatch.Kernel;
|
||||
var secondKernel = CentralDispatch.Kernel;
|
||||
var firstKernel = CentralDispatch.Container;
|
||||
var secondKernel = CentralDispatch.Container;
|
||||
|
||||
firstKernel.Should().BeSameAs(secondKernel);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ namespace NzbDrone.App.Test
|
|||
[Test]
|
||||
public void Kernel_should_be_able_to_resolve_ApplicationServer()
|
||||
{
|
||||
var appServer = CentralDispatch.Kernel.Get<ApplicationServer>();
|
||||
var appServer = CentralDispatch.Container.Resolve<ApplicationServer>();
|
||||
|
||||
appServer.Should().NotBeNull();
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ namespace NzbDrone.App.Test
|
|||
[Test]
|
||||
public void Kernel_should_resolve_same_ApplicationServer_instance()
|
||||
{
|
||||
var appServer1 = CentralDispatch.Kernel.Get<ApplicationServer>();
|
||||
var appServer2 = CentralDispatch.Kernel.Get<ApplicationServer>();
|
||||
var appServer1 = CentralDispatch.Container.Resolve<ApplicationServer>();
|
||||
var appServer2 = CentralDispatch.Container.Resolve<ApplicationServer>();
|
||||
|
||||
appServer1.Should().BeSameAs(appServer2);
|
||||
}
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
//using FluentAssertions;
|
||||
//using Moq;
|
||||
//using NUnit.Framework;
|
||||
//using Ninject;
|
||||
//using NzbDrone.Common;
|
||||
////using NzbDrone.Common;
|
||||
//using NzbDrone.Common.Model;
|
||||
//using NzbDrone.Providers;
|
||||
//using NzbDrone.Test.Common;
|
||||
|
|
|
@ -53,6 +53,12 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Autofac">
|
||||
<HintPath>..\packages\Autofac.2.6.3.862\lib\NET40\Autofac.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Autofac.Configuration">
|
||||
<HintPath>..\packages\Autofac.2.6.3.862\lib\NET40\Autofac.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FizzWare.NBuilder, Version=3.0.1.0, Culture=neutral, PublicKeyToken=5651b03e12e42c12, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBuilder.3.0.1.1\lib\FizzWare.NBuilder.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -63,10 +69,6 @@
|
|||
<Reference Include="Moq">
|
||||
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ninject, Version=3.0.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Ninject.3.0.1.10\lib\net40\Ninject.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autofac" version="2.6.3.862" targetFramework="net40" />
|
||||
<package id="FluentAssertions" version="1.7.0" />
|
||||
<package id="Moq" version="4.0.10827" />
|
||||
<package id="NBuilder" version="3.0.1.1" />
|
||||
<package id="Ninject" version="3.0.1.10" targetFramework="net40" />
|
||||
<package id="NLog" version="2.0.0.2000" />
|
||||
<package id="NUnit" version="2.6.0.12054" />
|
||||
</packages>
|
Loading…
Add table
Add a link
Reference in a new issue