main app cleanup.

This commit is contained in:
Keivan Beigi 2013-02-28 16:50:50 -08:00 committed by kay.one
commit 8900bbb3a1
20 changed files with 253 additions and 258 deletions

View file

@ -7,7 +7,6 @@ using Moq;
using NUnit.Framework;
using NzbDrone.Common;
using NzbDrone.Common.Model;
using NzbDrone.Providers;
using NzbDrone.Test.Common;
namespace NzbDrone.App.Test
@ -24,14 +23,14 @@ namespace NzbDrone.App.Test
Mocker.GetMock<ProcessProvider>().Setup(c => c.GetProcessById(It.IsAny<int>())).Returns((ProcessInfo)null);
Mocker.Resolve<MonitoringProvider>().EnsurePriority(null);
Mocker.Resolve<PriorityMonitor>().EnsurePriority(null);
}
[Test]
public void Ensure_should_log_warn_exception_rather_than_throw()
{
Mocker.GetMock<ProcessProvider>().Setup(c => c.GetCurrentProcess()).Throws<InvalidOperationException>();
Mocker.Resolve<MonitoringProvider>().EnsurePriority(null);
Mocker.Resolve<PriorityMonitor>().EnsurePriority(null);
ExceptionVerification.ExpectedWarns(1);
}