You can no longer add root folders that don't already exist.

This commit is contained in:
kay.one
2012-01-18 19:57:27 -08:00
parent 9406ca9cf5
commit 7c6d745c86
5 changed files with 74 additions and 73 deletions
@@ -1,5 +1,5 @@
// ReSharper disable InconsistentNaming
using System;
using System.IO;
using System.Linq;
using FluentAssertions;
@@ -9,7 +9,7 @@ using NzbDrone.Test.Common;
namespace NzbDrone.Common.Test
{
[TestFixture]
public class DiskProviderTests : TestBase
public class DiskProviderFixture : TestBase
{
DirectoryInfo BinFolder;
DirectoryInfo BinFolderCopy;
@@ -34,6 +34,24 @@ namespace NzbDrone.Common.Test
}
}
[Test]
public void directory_exist_should_be_able_to_find_existing_folder()
{
Mocker.Resolve<DiskProvider>().FolderExists(TempFolder).Should().BeTrue();
}
[Test]
public void directory_exist_should_be_able_to_find_existing_unc_share()
{
Mocker.Resolve<DiskProvider>().FolderExists(@"\\localhost\c$").Should().BeTrue();
}
[Test]
public void directory_exist_should_not_be_able_to_find_none_existing_folder()
{
Mocker.Resolve<DiskProvider>().FolderExists(@"C:\ThisBetterNotExist\").Should().BeFalse();
}
[Test]
public void moveFile_should_overwrite_existing_file()
{
@@ -65,7 +65,7 @@
<ItemGroup>
<Compile Include="ConfigFileProviderTest.cs" />
<Compile Include="PathExtentionFixture.cs" />
<Compile Include="DiskProviderTests.cs" />
<Compile Include="DiskProviderFixture.cs" />
<Compile Include="EnviromentProviderTest.cs" />
<Compile Include="ProcessProviderTests.cs" />
<Compile Include="ServiceProviderTests.cs" />