mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
cleaned up some code around process handling.
This commit is contained in:
parent
e24c85cc1c
commit
f9fe119af2
6 changed files with 55 additions and 47 deletions
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using FizzWare.NBuilder;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
|
@ -13,10 +12,10 @@ namespace NzbDrone.App.Test
|
|||
public class MonitoringProviderTest : TestBase<PriorityMonitor>
|
||||
{
|
||||
[Test]
|
||||
public void Ensure_priority_doesnt_fail_on_invalid_iis_proccess_id()
|
||||
public void Ensure_priority_doesnt_fail_on_invalid_process_id()
|
||||
{
|
||||
Mocker.GetMock<IProcessProvider>().Setup(c => c.GetCurrentProcess())
|
||||
.Returns(Builder<ProcessInfo>.CreateNew().With(c => c.Priority == ProcessPriorityClass.Normal).Build());
|
||||
.Returns(Builder<ProcessInfo>.CreateNew().Build());
|
||||
|
||||
Mocker.GetMock<IProcessProvider>().Setup(c => c.GetProcessById(It.IsAny<int>())).Returns((ProcessInfo)null);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue