Skip import when Series.Path doesn't exist

This commit is contained in:
Mark McDowall 2012-10-19 23:46:12 -07:00
commit b5e196fcef
4 changed files with 50 additions and 6 deletions

View file

@ -18,18 +18,20 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskProviderTests
public class FreeDiskSpaceTest : CoreTest
{
[Test]
public void FreeDiskSpace()
public void should_return_free_disk_space()
{
//Setup
//Act
var di = new DirectoryInfo(Directory.GetCurrentDirectory());
var result = Mocker.Resolve<DiskProvider>().FreeDiskSpace(di);
//Asert
//Checks to ensure that the free space on the first is greater than 0 (It should be in 99.99999999999999% of cases... I hope)
result.Should().BeGreaterThan(0);
}
[Test]
public void should_throw_if_directoy_does_not_exist()
{
var di = new DirectoryInfo(@"Z:\NOT_A_REAL_PATH\DOES_NOT_EXIST");
Assert.Throws<DirectoryNotFoundException>(() => Mocker.Resolve<DiskProvider>().FreeDiskSpace(di));
}
}
}