1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-17 21:26:22 -04:00

Added OsPath to handle OS agnostic path handling.

This commit is contained in:
Taloth Saldono
2014-10-13 00:00:03 +02:00
parent 67cd5703a1
commit 8a86b8acdc
28 changed files with 799 additions and 182 deletions

View File

@@ -97,13 +97,13 @@ namespace NzbDrone.Core.Test.RemotePathMappingsTests
GivenMapping();
var result = Subject.RemapRemoteToLocal(host, remotePath);
var result = Subject.RemapRemoteToLocal(host, new OsPath(remotePath));
result.Should().Be(expectedLocalPath);
}
[TestCase("my-server.localdomain", "/mnt/storage/downloads/tv", @"D:\mountedstorage\downloads\tv")]
[TestCase("my-server.localdomain", "/mnt/storage", @"D:\mountedstorage")]
[TestCase("my-server.localdomain", "/mnt/storage/", @"D:\mountedstorage")]
[TestCase("my-2server.localdomain", "/mnt/storage/downloads/tv", "/mnt/storage/downloads/tv")]
[TestCase("my-server.localdomain", "/mnt/storageabc/downloads/tv", "/mnt/storageabc/downloads/tv")]
public void should_remap_local_to_remote(String host, String expectedRemotePath, String localPath)
@@ -112,7 +112,7 @@ namespace NzbDrone.Core.Test.RemotePathMappingsTests
GivenMapping();
var result = Subject.RemapLocalToRemote(host, localPath);
var result = Subject.RemapLocalToRemote(host, new OsPath(localPath));
result.Should().Be(expectedRemotePath);
}