1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-02-27 08:33:21 +00:00
Radarr/src/NzbDrone.Windows.Test/ServiceFactoryFixture.cs
2014-02-10 11:40:13 -08:00

31 lines
No EOL
838 B
C#

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();
}
}
}