protected override void InitializeTestTarget() { Indexers.Post(new Api.Indexers.IndexerResource { EnableRss = false, EnableSearch = false, ConfigContract = nameof(NewznabSettings), Implementation = nameof(Newznab), Name = "NewznabTest", Protocol = Core.Indexers.DownloadProtocol.Usenet, Fields = Api.ClientSchema.SchemaBuilder.ToSchema(new NewznabSettings()) }); }
protected override void InitializeTestTarget() { // Add Wombles var wombles = Indexers.Post(new Api.Indexers.IndexerResource { EnableRss = true, ConfigContract = "NullConfig", Implementation = "Wombles", Name = "Wombles", Protocol = Core.Indexers.DownloadProtocol.Usenet, Fields = new List <Api.ClientSchema.Field>() }); }
public void v2_categories_should_accept_emptystring() { var schema = GetNewznabSchemav2("Testv2emptystring"); var categoriesField = GetCategoriesField(schema); categoriesField.Value = ""; var result = Indexers.Post(schema); var resultArray = GetCategoriesField(result).Value; resultArray.Should().BeOfType <JArray>(); resultArray.As <JArray>().Should().BeEmpty(); }
public void v3_categories_should_accept_array() { var schema = GetNewznabSchemav3("Testv3array"); var categoriesField = GetCategoriesField(schema); categoriesField.Value = new object[] { 1000, 1010 }; var result = Indexers.Post(schema); var resultArray = GetCategoriesField(result).Value; resultArray.Should().BeOfType <JArray>(); resultArray.As <JArray>().ToObject <int[]>().Should().BeEquivalentTo(new[] { 1000, 1010 }); }
public void v3_categories_should_accept_null() { var schema = GetNewznabSchemav3("Testv3null"); var categoriesField = GetCategoriesField(schema); categoriesField.Value = null; var result = Indexers.Post(schema); var resultArray = GetCategoriesField(result).Value; resultArray.Should().BeOfType <JArray>(); resultArray.As <JArray>().Should().BeEmpty(); }
protected override void InitializeTestTarget() { Indexers.Post(new Api.Indexers.IndexerResource { EnableRss = false, EnableSearch = false, ConfigContract = nameof(NewznabSettings), Implementation = nameof(Newznab), Name = "NewznabTest", Protocol = Core.Indexers.DownloadProtocol.Usenet, Fields = SchemaBuilder.ToSchema(new NewznabSettings()) }); // Change Console Log Level to Debug so we get more details. var config = HostConfig.Get(1); config.ConsoleLogLevel = "Debug"; HostConfig.Put(config); }
protected override void InitializeTestTarget() { WaitForCompletion(() => Tasks.All().SelectList(x => x.TaskName).Contains("CheckHealth")); Indexers.Post(new Prowlarr.Api.V1.Indexers.IndexerResource { Enable = false, ConfigContract = nameof(FileListSettings), Implementation = nameof(FileList), Name = "NewznabTest", Protocol = Core.Indexers.DownloadProtocol.Usenet, Fields = SchemaBuilder.ToSchema(new FileListSettings()) }); // Change Console Log Level to Debug so we get more details. var config = HostConfig.Get(1); config.ConsoleLogLevel = "Debug"; HostConfig.Put(config); }
protected override void InitializeTestTarget() { // Make sure tasks have been initialized so the config put below doesn't cause errors WaitForCompletion(() => Tasks.All().SelectList(x => x.TaskName).Contains("RssSync")); Indexers.Post(new Radarr.Api.V3.Indexers.IndexerResource { EnableRss = false, EnableInteractiveSearch = false, EnableAutomaticSearch = false, ConfigContract = nameof(NewznabSettings), Implementation = nameof(Newznab), Name = "NewznabTest", Protocol = Core.Indexers.DownloadProtocol.Usenet, Fields = SchemaBuilder.ToSchema(new NewznabSettings()) }); // Change Console Log Level to Debug so we get more details. var config = HostConfig.Get(1); config.ConsoleLogLevel = "Debug"; HostConfig.Put(config); }