diff --git a/src/Recyclarr.Cli/Console/Commands/ConfigListCommand.cs b/src/Recyclarr.Cli/Console/Commands/ConfigListCommand.cs index fa2f3eba..1c515e7d 100644 --- a/src/Recyclarr.Cli/Console/Commands/ConfigListCommand.cs +++ b/src/Recyclarr.Cli/Console/Commands/ConfigListCommand.cs @@ -20,9 +20,9 @@ public class ConfigListCommand : AsyncCommand public class CliSettings : BaseCommandSettings { [CommandArgument(0, "[ListCategory]")] - [EnumDescription( + [EnumDescription( "The type of configuration information to list. If not specified, defaults to 'local'.")] - public ConfigListCategory ListCategory { get; [UsedImplicitly] init; } = ConfigListCategory.Local; + public ConfigCategory ListCategory { get; [UsedImplicitly] init; } = ConfigCategory.Local; } public ConfigListCommand(ILogger log, ConfigListProcessor processor) diff --git a/src/Recyclarr.Cli/Processors/Config/ConfigListProcessor.cs b/src/Recyclarr.Cli/Processors/Config/ConfigListProcessor.cs index d91d94a7..ac403ad9 100644 --- a/src/Recyclarr.Cli/Processors/Config/ConfigListProcessor.cs +++ b/src/Recyclarr.Cli/Processors/Config/ConfigListProcessor.cs @@ -7,12 +7,12 @@ namespace Recyclarr.Cli.Processors.Config; public class ConfigListProcessor { private readonly ILogger _log; - private readonly IIndex _configListers; + private readonly IIndex _configListers; private readonly IConfigTemplatesRepo _repo; public ConfigListProcessor( ILogger log, - IIndex configListers, + IIndex configListers, IConfigTemplatesRepo repo) { _log = log; @@ -20,9 +20,9 @@ public class ConfigListProcessor _repo = repo; } - public async Task Process(ConfigListCategory listCategory) + public async Task Process(ConfigCategory listCategory) { - if (listCategory == ConfigListCategory.Templates) + if (listCategory == ConfigCategory.Templates) { await _repo.Update(); } diff --git a/src/Recyclarr.TrashLib/Config/ConfigAutofacModule.cs b/src/Recyclarr.TrashLib/Config/ConfigAutofacModule.cs index 6fb2e19f..9febd00f 100644 --- a/src/Recyclarr.TrashLib/Config/ConfigAutofacModule.cs +++ b/src/Recyclarr.TrashLib/Config/ConfigAutofacModule.cs @@ -37,7 +37,7 @@ public class ConfigAutofacModule : Module builder.RegisterType(); // Config Listers - builder.RegisterType().Keyed(ConfigListCategory.Templates); - builder.RegisterType().Keyed(ConfigListCategory.Local); + builder.RegisterType().Keyed(ConfigCategory.Templates); + builder.RegisterType().Keyed(ConfigCategory.Local); } } diff --git a/src/Recyclarr.TrashLib/Config/Listers/ConfigListCategory.cs b/src/Recyclarr.TrashLib/Config/Listers/ConfigCategory.cs similarity index 70% rename from src/Recyclarr.TrashLib/Config/Listers/ConfigListCategory.cs rename to src/Recyclarr.TrashLib/Config/Listers/ConfigCategory.cs index 6e860461..4a67b1c4 100644 --- a/src/Recyclarr.TrashLib/Config/Listers/ConfigListCategory.cs +++ b/src/Recyclarr.TrashLib/Config/Listers/ConfigCategory.cs @@ -1,6 +1,6 @@ namespace Recyclarr.TrashLib.Config.Listers; -public enum ConfigListCategory +public enum ConfigCategory { Local, Templates diff --git a/src/tests/Recyclarr.Cli.Tests/Processors/ConfigListProcessorTest.cs b/src/tests/Recyclarr.Cli.Tests/Processors/ConfigListProcessorTest.cs index bf58c125..9d8dd484 100644 --- a/src/tests/Recyclarr.Cli.Tests/Processors/ConfigListProcessorTest.cs +++ b/src/tests/Recyclarr.Cli.Tests/Processors/ConfigListProcessorTest.cs @@ -10,10 +10,10 @@ namespace Recyclarr.Cli.Tests.Processors; public class ConfigListProcessorTest { [Test] - [InlineAutoMockData(ConfigListCategory.Templates)] + [InlineAutoMockData(ConfigCategory.Templates)] public async Task List_templates_invokes_correct_lister( - ConfigListCategory category, - [Frozen(Matching.ImplementedInterfaces)] StubAutofacIndex configListers, + ConfigCategory category, + [Frozen(Matching.ImplementedInterfaces)] StubAutofacIndex configListers, IConfigLister lister, ConfigListProcessor sut) { diff --git a/src/tests/Recyclarr.TrashLib.Tests/Config/ConfigAutofacModuleTest.cs b/src/tests/Recyclarr.TrashLib.Tests/Config/ConfigAutofacModuleTest.cs index 5b43bcaf..3c7de5c0 100644 --- a/src/tests/Recyclarr.TrashLib.Tests/Config/ConfigAutofacModuleTest.cs +++ b/src/tests/Recyclarr.TrashLib.Tests/Config/ConfigAutofacModuleTest.cs @@ -8,15 +8,15 @@ namespace Recyclarr.TrashLib.Tests.Config; [Parallelizable(ParallelScope.All)] public class ConfigAutofacModuleTest : TrashLibIntegrationFixture { - private static IEnumerable AllConfigListCategories() + private static IEnumerable AllConfigListCategories() { - return Enum.GetValues(); + return Enum.GetValues(); } [TestCaseSource(nameof(AllConfigListCategories))] - public void All_list_category_types_registered(ConfigListCategory category) + public void All_list_category_types_registered(ConfigCategory category) { - var sut = Resolve>(); + var sut = Resolve>(); var result = sut.TryGetValue(category, out _); result.Should().BeTrue(); }