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.
37 lines
1010 B
37 lines
1010 B
using AutoFixture.NUnit3;
|
|
using CliFx.Infrastructure;
|
|
using FluentAssertions;
|
|
using NSubstitute;
|
|
using NUnit.Framework;
|
|
using TestLibrary.AutoFixture;
|
|
using TrashLib.Services.Radarr.CustomFormat;
|
|
using TrashLib.Services.Radarr.CustomFormat.Guide;
|
|
using TrashLib.TestLibrary;
|
|
|
|
namespace TrashLib.Tests.Radarr.CustomFormat;
|
|
|
|
[TestFixture]
|
|
[Parallelizable(ParallelScope.All)]
|
|
public class RadarrGuideDataListerTest
|
|
{
|
|
[Test, AutoMockData]
|
|
public void Custom_formats_appear_in_console_output(
|
|
[Frozen] IRadarrGuideService guide,
|
|
[Frozen(Matching.ImplementedInterfaces)] FakeInMemoryConsole console,
|
|
RadarrGuideDataLister sut)
|
|
{
|
|
var testData = new[]
|
|
{
|
|
NewCf.Data("First", "123"),
|
|
NewCf.Data("Second", "456")
|
|
};
|
|
|
|
guide.GetCustomFormatData().Returns(testData);
|
|
|
|
sut.ListCustomFormats();
|
|
|
|
console.ReadOutputString().Should().ContainAll(
|
|
testData.SelectMany(x => new[] {x.Name, x.TrashId}));
|
|
}
|
|
}
|