You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using FluentAssertions;
|
|
|
|
|
using Moq;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
|
using NzbDrone.Core.Indexers;
|
|
|
|
|
using NzbDrone.Core.Parser.Model;
|
|
|
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Test.IndexerTests
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class SeedConfigProviderFixture : CoreTest<SeedConfigProvider>
|
|
|
|
|
{
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_not_return_config_for_non_existent_indexer()
|
|
|
|
|
{
|
|
|
|
|
Mocker.GetMock<IIndexerFactory>()
|
|
|
|
|
.Setup(v => v.Get(It.IsAny<int>()))
|
|
|
|
|
.Throws(new ModelNotFoundException(typeof(IndexerDefinition), 0));
|
|
|
|
|
|
|
|
|
|
var result = Subject.GetSeedConfiguration(new RemoteMovie
|
|
|
|
|
{
|
|
|
|
|
Release = new ReleaseInfo()
|
|
|
|
|
{
|
|
|
|
|
DownloadProtocol = DownloadProtocol.Torrent,
|
|
|
|
|
IndexerId = 0
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
result.Should().BeNull();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|