indexers: set indexer details as properties (#14131)

This commit is contained in:
Bogdan
2023-03-09 16:06:12 +02:00
committed by GitHub
parent 7e8111f6cd
commit c7e9d4e72b
100 changed files with 1003 additions and 1002 deletions

View File

@@ -12,12 +12,13 @@ namespace Jackett.Test.Common.Models
{
class TestIndexer : BaseIndexer
{
public override string Id => "test_id";
public override string Name => "test_name";
public override string Description => "test_description";
public override string SiteLink => "https://test.link/";
public TestIndexer()
: base(id: "test_id",
name: "test_name",
description: "test_description",
link: "https://test.link/",
configService: null,
: base(configService: null,
logger: null,
configData: null,
p: null,

View File

@@ -14,9 +14,9 @@ namespace Jackett.Test.Common.Utils.FilterFuncs
public virtual string[] AlternativeSiteLinks => throw TestExceptions.UnexpectedInvocation;
public virtual string DisplayName => throw TestExceptions.UnexpectedInvocation;
public virtual string Name => throw TestExceptions.UnexpectedInvocation;
public virtual string DisplayDescription => throw TestExceptions.UnexpectedInvocation;
public virtual string Description => throw TestExceptions.UnexpectedInvocation;
public virtual string Type => throw TestExceptions.UnexpectedInvocation;

View File

@@ -11,12 +11,25 @@ namespace Jackett.Test.TestHelpers
{
public class TestWebIndexer : BaseWebIndexer
{
public override string Id => "test_id";
public override string Name => "test_name";
public override string Description => "test_description";
public override string SiteLink => "https://test.link/";
public override string[] AlternativeSiteLinks => new[]
{
"https://test.link/",
"https://alternative-test.link/"
};
public override string[] LegacySiteLinks => new[]
{
"https://legacy-test.link/"
};
public override Encoding Encoding { get; protected set; } = Encoding.UTF8;
public override string Language { get; protected set; } = "en-us";
public override string Type { get; protected set; } = "private";
public TestWebIndexer() :
base(id: "test_id",
name: "test_name",
description: "test_description",
link: "https://test.link/",
caps: new TorznabCapabilities(),
base(caps: new TorznabCapabilities(),
client: null,
configService: null,
logger: null,
@@ -24,20 +37,8 @@ namespace Jackett.Test.TestHelpers
p: null,
cacheService: null)
{
Encoding = Encoding.UTF8;
Language = "en-us";
Type = "private";
}
public override string[] AlternativeSiteLinks { get; protected set; } = {
"https://test.link/",
"https://alternative-test.link/"
};
public override string[] LegacySiteLinks { get; protected set; } = {
"https://legacy-test.link/"
};
public override Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson) =>
throw new NotImplementedException();
protected override Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query) =>