mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Fixed some unit tests
This commit is contained in:
@@ -50,6 +50,10 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentAssertions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\FluentAssertions.2.1.0.0\lib\net40\FluentAssertions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
|
||||
@@ -67,6 +71,7 @@
|
||||
<Compile Include="DiskProviderTests\DiskProviderFixture.cs" />
|
||||
<Compile Include="DiskProviderTests\FreeSpaceFixture.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ServiceFactoryFixture.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NzbDrone.Common.Test\NzbDrone.Common.Test.csproj">
|
||||
@@ -77,6 +82,14 @@
|
||||
<Project>{f2be0fdf-6e47-4827-a420-dd4ef82407f8}</Project>
|
||||
<Name>NzbDrone.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\NzbDrone.Core\NzbDrone.Core.csproj">
|
||||
<Project>{ff5ee3b6-913b-47ce-9ceb-11c51b4e1205}</Project>
|
||||
<Name>NzbDrone.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\NzbDrone.Host\NzbDrone.Host.csproj">
|
||||
<Project>{95c11a9e-56ed-456a-8447-2c89c1139266}</Project>
|
||||
<Name>NzbDrone.Host</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\NzbDrone.Test.Common\NzbDrone.Test.Common.csproj">
|
||||
<Project>{caddfce0-7509-4430-8364-2074e1eefca2}</Project>
|
||||
<Name>NzbDrone.Test.Common</Name>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Host;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.Windows.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class ServiceFactoryFixture : TestBase<ServiceFactory>
|
||||
{
|
||||
[SetUp]
|
||||
public void setup()
|
||||
{
|
||||
Mocker.SetConstant(MainAppContainerBuilder.BuildContainer(new StartupContext()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void event_handlers_should_be_unique()
|
||||
{
|
||||
var handlers = Subject.BuildAll<IHandle<ApplicationShutdownRequested>>()
|
||||
.Select(c => c.GetType().FullName);
|
||||
|
||||
handlers.Should().OnlyHaveUniqueItems();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="FluentAssertions" version="2.1.0.0" targetFramework="net40" />
|
||||
<package id="NUnit" version="2.6.2" targetFramework="net40" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user