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.
35 lines
1020 B
35 lines
1020 B
using Recyclarr.Cli.Console.Settings;
|
|
using Recyclarr.Cli.Pipelines.CustomFormat;
|
|
using Recyclarr.Tests.TestLibrary;
|
|
using Recyclarr.TrashGuide.CustomFormat;
|
|
using Spectre.Console.Testing;
|
|
|
|
namespace Recyclarr.Cli.Tests.Pipelines.CustomFormat;
|
|
|
|
[TestFixture]
|
|
[Parallelizable(ParallelScope.All)]
|
|
public class CustomFormatDataListerTest
|
|
{
|
|
[Test, AutoMockData]
|
|
public void Custom_formats_appear_in_console_output(
|
|
[Frozen(Matching.ImplementedInterfaces)] TestConsole console,
|
|
[Frozen] ICustomFormatGuideService guide,
|
|
IListCustomFormatSettings settings,
|
|
CustomFormatDataLister sut)
|
|
{
|
|
var testData = new[]
|
|
{
|
|
NewCf.Data("First", "123"),
|
|
NewCf.Data("Second", "456")
|
|
};
|
|
|
|
guide.GetCustomFormatData(default!).ReturnsForAnyArgs(testData);
|
|
settings.ScoreSets.Returns(false);
|
|
|
|
sut.List(settings);
|
|
|
|
console.Output.Should().ContainAll(
|
|
testData.SelectMany(x => new[] {x.Name, x.TrashId}));
|
|
}
|
|
}
|