mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-27 22:56:45 -04:00
removed dead code
This commit is contained in:
@@ -61,28 +61,6 @@ namespace NzbDrone.Core.Test.RootFolderTests
|
||||
Mocker.GetMock<IRootFolderRepository>().Verify(c => c.Delete(1), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_empty_list_when_folder_doesnt_exist()
|
||||
{
|
||||
WithNonExistingFolder();
|
||||
|
||||
Mocker.GetMock<IRootFolderRepository>().Setup(c => c.All()).Returns(new List<RootFolder>());
|
||||
|
||||
const string path = "d:\\bad folder";
|
||||
|
||||
var result = Subject.GetUnmappedFolders(path);
|
||||
|
||||
result.Should().NotBeNull();
|
||||
result.Should().BeEmpty();
|
||||
Mocker.GetMock<IDiskProvider>().Verify(c => c.GetDirectories(It.IsAny<String>()), Times.Never());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetUnmappedFolders_throw_on_empty_folders()
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => Mocker.Resolve<RootFolderService>().GetUnmappedFolders(""));
|
||||
}
|
||||
|
||||
[TestCase("")]
|
||||
[TestCase(null)]
|
||||
[TestCase("BAD PATH")]
|
||||
@@ -101,25 +79,6 @@ namespace NzbDrone.Core.Test.RootFolderTests
|
||||
Assert.Throws<InvalidOperationException>(() => Subject.Add(new RootFolder { Path = @"C:\TV".AsOsAgnostic() }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_include_system_files_and_folders()
|
||||
{
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(s => s.GetDirectories(It.IsAny<String>()))
|
||||
.Returns(new string[]
|
||||
{
|
||||
@"C:\30 Rock".AsOsAgnostic(),
|
||||
@"C:\$Recycle.Bin".AsOsAgnostic(),
|
||||
@"C:\.AppleDouble".AsOsAgnostic(),
|
||||
@"C:\Test\.AppleDouble".AsOsAgnostic()
|
||||
});
|
||||
|
||||
Mocker.GetMock<ISeriesService>()
|
||||
.Setup(s => s.GetAllSeries())
|
||||
.Returns(new List<Series>());
|
||||
|
||||
Subject.GetUnmappedFolders(@"C:\")
|
||||
.Should().OnlyContain(u => u.Path == @"C:\30 Rock".AsOsAgnostic());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user