mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Fixed: All the tests
This commit is contained in:
parent
9392c13364
commit
ee7d47d044
29 changed files with 397 additions and 209 deletions
|
@ -16,7 +16,7 @@ namespace NzbDrone.Update.Test
|
|||
[Test]
|
||||
public void should_start_service_if_app_type_was_serivce()
|
||||
{
|
||||
const string targetFolder = "c:\\Lidarr\\";
|
||||
string targetFolder = "c:\\Lidarr\\".AsOsAgnostic();
|
||||
|
||||
Subject.Start(AppType.Service, targetFolder);
|
||||
|
||||
|
@ -26,13 +26,14 @@ namespace NzbDrone.Update.Test
|
|||
[Test]
|
||||
public void should_start_console_if_app_type_was_service_but_start_failed_because_of_permissions()
|
||||
{
|
||||
const string targetFolder = "c:\\Lidarr\\";
|
||||
string targetFolder = "c:\\Lidarr\\".AsOsAgnostic();
|
||||
string targetProcess = "c:\\Lidarr\\Lidarr.Console.exe".AsOsAgnostic();
|
||||
|
||||
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:\\Lidarr\\Lidarr.Console.exe", "/" + StartupContext.NO_BROWSER, null, false), Times.Once());
|
||||
Mocker.GetMock<IProcessProvider>().Verify(c => c.SpawnNewProcess(targetProcess, "/" + StartupContext.NO_BROWSER, null, false), Times.Once());
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue