More NzbDrone.Common updates

This commit is contained in:
kay.one 2011-10-23 15:44:37 -07:00
parent 6828f099bc
commit c42518b34e
6 changed files with 46 additions and 2 deletions

View file

@ -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();
}
}
}