mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Rename More Sonarr References
This commit is contained in:
parent
f69559e4da
commit
5003cd8a14
31 changed files with 108 additions and 113 deletions
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Model;
|
||||
|
@ -34,7 +34,7 @@ namespace NzbDrone.Update.Test
|
|||
[Test]
|
||||
public void should_call_update_with_correct_path()
|
||||
{
|
||||
var ProcessPath = @"C:\NzbDrone\lidarr.exe".AsOsAgnostic();
|
||||
var ProcessPath = @"C:\Lidarr\lidarr.exe".AsOsAgnostic();
|
||||
|
||||
Mocker.GetMock<IProcessProvider>().Setup(c => c.GetProcessById(12))
|
||||
.Returns(new ProcessInfo() { StartPath = ProcessPath });
|
||||
|
@ -43,7 +43,7 @@ namespace NzbDrone.Update.Test
|
|||
Subject.Start(new[] { "12", "", ProcessPath });
|
||||
|
||||
|
||||
Mocker.GetMock<IInstallUpdateService>().Verify(c => c.Start(@"C:\NzbDrone".AsOsAgnostic(), 12), Times.Once());
|
||||
Mocker.GetMock<IInstallUpdateService>().Verify(c => c.Start(@"C:\Lidarr".AsOsAgnostic(), 12), Times.Once());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
|
@ -16,23 +16,23 @@ namespace NzbDrone.Update.Test
|
|||
[Test]
|
||||
public void should_start_service_if_app_type_was_serivce()
|
||||
{
|
||||
const string targetFolder = "c:\\NzbDrone\\";
|
||||
const string targetFolder = "c:\\Lidarr\\";
|
||||
|
||||
Subject.Start(AppType.Service, targetFolder);
|
||||
|
||||
Mocker.GetMock<IServiceProvider>().Verify(c => c.Start(ServiceProvider.NZBDRONE_SERVICE_NAME), Times.Once());
|
||||
Mocker.GetMock<IServiceProvider>().Verify(c => c.Start(ServiceProvider.SERVICE_NAME), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_start_console_if_app_type_was_service_but_start_failed_because_of_permissions()
|
||||
{
|
||||
const string targetFolder = "c:\\NzbDrone\\";
|
||||
const string targetFolder = "c:\\Lidarr\\";
|
||||
|
||||
Mocker.GetMock<IServiceProvider>().Setup(c => c.Start(ServiceProvider.NZBDRONE_SERVICE_NAME)).Throws(new InvalidOperationException());
|
||||
Mocker.GetMock<IServiceProvider>().Setup(c => c.Start(ServiceProvider.SERVICE_NAME)).Throws(new InvalidOperationException());
|
||||
|
||||
Subject.Start(AppType.Service, targetFolder);
|
||||
|
||||
Mocker.GetMock<IProcessProvider>().Verify(c => c.SpawnNewProcess("c:\\NzbDrone\\Lidarr.Console.exe", "/" + StartupContext.NO_BROWSER, null), Times.Once());
|
||||
Mocker.GetMock<IProcessProvider>().Verify(c => c.SpawnNewProcess("c:\\Lidarr\\Lidarr.Console.exe", "/" + StartupContext.NO_BROWSER, null), Times.Once());
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue