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.
recyclarr/src/Recyclarr.TrashLib.Tests/Config/Listers/ConfigTemplateListerTest.cs

34 lines
1.1 KiB

using System.IO.Abstractions;
using Recyclarr.Cli.TestLibrary;
using Recyclarr.TrashLib.Config;
using Recyclarr.TrashLib.Config.Listers;
using Recyclarr.TrashLib.Config.Services;
using Spectre.Console.Testing;
namespace Recyclarr.TrashLib.Tests.Config.Listers;
[TestFixture]
[Parallelizable(ParallelScope.All)]
public class ConfigTemplateListerTest : IntegrationFixture
{
[Test, AutoMockData]
public void Hidden_templates_are_not_rendered(
IFileInfo stubFile,
[Frozen(Matching.ImplementedInterfaces)] TestConsole console,
[Frozen] IConfigTemplateGuideService guideService,
ConfigTemplateLister sut)
{
guideService.TemplateData.Returns(new[]
{
new TemplatePath(SupportedServices.Radarr, "r1", stubFile, false),
new TemplatePath(SupportedServices.Radarr, "r2", stubFile, false),
new TemplatePath(SupportedServices.Sonarr, "s1", stubFile, false),
new TemplatePath(SupportedServices.Sonarr, "s2", stubFile, true),
});
sut.List();
console.Output.Should().NotContain("s2");
}
}