New: Implemented Torrent Download Clients: uTorrent, Transmission and Deluge. And several public and private Torrent Indexers.

This commit is contained in:
MythJuha
2014-05-13 19:57:46 +02:00
committed by Taloth Saldono
parent ffa814f387
commit 67cd5703a1
134 changed files with 11018 additions and 99 deletions
@@ -26,6 +26,10 @@ namespace NzbDrone.Core.Test.RemotePathMappingsTests
Mocker.GetMock<IRemotePathMappingRepository>()
.Setup(s => s.All())
.Returns(new List<RemotePathMapping>());
Mocker.GetMock<IRemotePathMappingRepository>()
.Setup(s => s.Insert(It.IsAny<RemotePathMapping>()))
.Returns<RemotePathMapping>(m => m);
}
private void GivenMapping()
@@ -112,5 +116,24 @@ namespace NzbDrone.Core.Test.RemotePathMappingsTests
result.Should().Be(expectedRemotePath);
}
[TestCase(@"\\server\share\with/mixed/slashes", @"\\server\share\with\mixed\slashes\")]
[TestCase(@"D:/with/forward/slashes", @"D:\with\forward\slashes\")]
[TestCase(@"D:/with/mixed\slashes", @"D:\with\mixed\slashes\")]
public void should_fix_wrong_slashes_on_add(String remotePath, String cleanedPath)
{
GivenMapping();
var mapping = new RemotePathMapping
{
Host = "my-server.localdomain",
RemotePath = remotePath,
LocalPath = @"D:\mountedstorage\downloads\tv" .AsOsAgnostic()
};
var result = Subject.Add(mapping);
result.RemotePath.Should().Be(cleanedPath);
}
}
}