mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
parent
a602611a5f
commit
a4b78b44ce
1307 changed files with 8702 additions and 7403 deletions
|
@ -13,8 +13,8 @@ namespace NzbDrone.Update.Test
|
|||
[TestFixture]
|
||||
public class InstallUpdateServiceFixture : TestBase<InstallUpdateService>
|
||||
{
|
||||
private string _targetFolder = @"C:\NzbDrone\".AsOsAgnostic();
|
||||
private const int _processId = 12;
|
||||
private string _targetFolder = @"C:\NzbDrone\".AsOsAgnostic();
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
|
|
|
@ -11,15 +11,12 @@ namespace NzbDrone.Update.Test
|
|||
[TestFixture]
|
||||
public class ProgramFixture : TestBase<UpdateApp>
|
||||
{
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_throw_if_null_passed_in()
|
||||
{
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => Subject.Start(null));
|
||||
}
|
||||
|
||||
|
||||
[TestCase("d", "")]
|
||||
[TestCase("", "")]
|
||||
[TestCase("0", "")]
|
||||
|
@ -34,18 +31,14 @@ namespace NzbDrone.Update.Test
|
|||
[Test]
|
||||
public void should_call_update_with_correct_path()
|
||||
{
|
||||
var ProcessPath = @"C:\Lidarr\lidarr.exe".AsOsAgnostic();
|
||||
var processPath = @"C:\Lidarr\lidarr.exe".AsOsAgnostic();
|
||||
|
||||
Mocker.GetMock<IProcessProvider>().Setup(c => c.GetProcessById(12))
|
||||
.Returns(new ProcessInfo() { StartPath = ProcessPath });
|
||||
|
||||
|
||||
Subject.Start(new[] { "12", "", ProcessPath });
|
||||
.Returns(new ProcessInfo() { StartPath = processPath });
|
||||
|
||||
Subject.Start(new[] { "12", "", processPath });
|
||||
|
||||
Mocker.GetMock<IInstallUpdateService>().Verify(c => c.Start(@"C:\Lidarr".AsOsAgnostic(), 12), Times.Once());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue