mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Skip import when Series.Path doesn't exist
This commit is contained in:
parent
887456b337
commit
b5e196fcef
4 changed files with 50 additions and 6 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue