mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 19:50:15 -07:00
More NzbDrone.Common updates
This commit is contained in:
parent
6828f099bc
commit
c42518b34e
6 changed files with 46 additions and 2 deletions
|
@ -3,6 +3,7 @@ using System;
|
|||
using System.IO;
|
||||
using AutoMoq;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Update.Providers;
|
||||
|
@ -59,5 +60,19 @@ namespace NzbDrone.Update.Test
|
|||
Assert.Throws<DirectoryNotFoundException>(() => mocker.Resolve<UpdateProvider>().Verify(targetFolder))
|
||||
.Message.Should().StartWith("Update folder doesn't exist");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void verify_should_pass_if_update_folder_and_target_folder_both_exist()
|
||||
{
|
||||
const string targetFolder = "c:\\NzbDrone\\";
|
||||
|
||||
mocker.GetMock<DiskProvider>()
|
||||
.Setup(c => c.FolderExists(It.IsAny<string>()))
|
||||
.Returns(true);
|
||||
|
||||
mocker.Resolve<UpdateProvider>().Verify(targetFolder);
|
||||
|
||||
mocker.VerifyAllMocks();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue