New: Link indexer to specific download client (#2668)

* New: Link indexer to specific download client

Closes #1215
Co-authored-by: Qstick <qstick@gmail.com>

(cherry picked from commit 13aaa20f1bf1448fa804738804205cb16f0d91f9)

* lint

Co-authored-by: Qiming Chen <simoncqm@gmail.com>
This commit is contained in:
Kai Yang
2022-06-07 11:06:40 +08:00
committed by GitHub
parent 2a72a0e318
commit 9b120f4885
13 changed files with 221 additions and 7 deletions
@@ -31,8 +31,8 @@ namespace NzbDrone.Core.Test.Download
.Returns(_downloadClients);
Mocker.GetMock<IProvideDownloadClient>()
.Setup(v => v.GetDownloadClient(It.IsAny<DownloadProtocol>()))
.Returns<DownloadProtocol>(v => _downloadClients.FirstOrDefault(d => d.Protocol == v));
.Setup(v => v.GetDownloadClient(It.IsAny<DownloadProtocol>(), It.IsAny<int>()))
.Returns<DownloadProtocol, int>((v, i) => _downloadClients.FirstOrDefault(d => d.Protocol == v));
var episodes = Builder<Album>.CreateListOfSize(2)
.TheFirst(1).With(s => s.Id = 12)