mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
DiskProvider.MoveFile now overwrites existing file.
This commit is contained in:
parent
d97a1d068c
commit
950b2f0965
2 changed files with 24 additions and 8 deletions
|
@ -34,6 +34,20 @@ namespace NzbDrone.Common.Test
|
|||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void moveFile_should_overwrite_existing_file()
|
||||
{
|
||||
var diskProvider = new DiskProvider();
|
||||
diskProvider.CopyDirectory(BinFolder.FullName, BinFolderCopy.FullName);
|
||||
|
||||
var targetPath = Path.Combine(BinFolderCopy.FullName, "file.move");
|
||||
|
||||
diskProvider.MoveFile(BinFolderCopy.GetFiles("*.dll", SearchOption.AllDirectories).First().FullName, targetPath);
|
||||
diskProvider.MoveFile(BinFolderCopy.GetFiles("*.dll", SearchOption.AllDirectories).First().FullName, targetPath);
|
||||
|
||||
File.Exists(targetPath).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CopyFolder_should_copy_folder()
|
||||
{
|
||||
|
@ -45,6 +59,7 @@ namespace NzbDrone.Common.Test
|
|||
VerifyCopy();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void CopyFolder_should_overright_existing_folder()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue