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/CustomFormat/GuideDataListerTest.cs

31 lines
869 B

using Recyclarr.TrashLib.Pipelines.CustomFormat.Guide;
using Recyclarr.TrashLib.TestLibrary;
using Spectre.Console.Testing;
namespace Recyclarr.TrashLib.Tests.CustomFormat;
[TestFixture]
[Parallelizable(ParallelScope.All)]
public class GuideDataListerTest
{
[Test, AutoMockData]
public void Custom_formats_appear_in_console_output(
[Frozen(Matching.ImplementedInterfaces)] TestConsole console,
[Frozen] ICustomFormatGuideService guide,
CustomFormatDataLister sut)
{
var testData = new[]
{
NewCf.Data("First", "123"),
NewCf.Data("Second", "456")
};
guide.GetCustomFormatData(default!).ReturnsForAnyArgs(testData);
sut.ListCustomFormats(default!);
console.Output.Should().ContainAll(
testData.SelectMany(x => new[] {x.Name, x.TrashId}));
}
}