mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
fixed more tests.
This commit is contained in:
parent
9fdfd13dbf
commit
b03388f7b9
31 changed files with 198 additions and 198 deletions
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
using FizzWare.NBuilder;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
|
@ -12,9 +10,8 @@ using NzbDrone.Test.Common;
|
|||
namespace NzbDrone.App.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class MonitoringProviderTest : TestBase
|
||||
public class MonitoringProviderTest : TestBase<PriorityMonitor>
|
||||
{
|
||||
|
||||
[Test]
|
||||
public void Ensure_priority_doesnt_fail_on_invalid_iis_proccess_id()
|
||||
{
|
||||
|
@ -23,18 +20,16 @@ namespace NzbDrone.App.Test
|
|||
|
||||
Mocker.GetMock<ProcessProvider>().Setup(c => c.GetProcessById(It.IsAny<int>())).Returns((ProcessInfo)null);
|
||||
|
||||
Mocker.Resolve<PriorityMonitor>().EnsurePriority(null);
|
||||
Subject.EnsurePriority(null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Ensure_should_log_warn_exception_rather_than_throw()
|
||||
{
|
||||
Mocker.GetMock<ProcessProvider>().Setup(c => c.GetCurrentProcess()).Throws<InvalidOperationException>();
|
||||
Mocker.Resolve<PriorityMonitor>().EnsurePriority(null);
|
||||
Subject.EnsurePriority(null);
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue