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.
40 lines
1.0 KiB
40 lines
1.0 KiB
using Recyclarr.TrashLib.Config.Services.Sonarr;
|
|
using Recyclarr.TrashLib.Pipelines.Tags.PipelinePhases;
|
|
|
|
namespace Recyclarr.TrashLib.Tests.Pipelines.Tags.PipelinePhases;
|
|
|
|
[TestFixture]
|
|
[Parallelizable(ParallelScope.All)]
|
|
public class TagConfigPhaseTest
|
|
{
|
|
[Test, AutoMockData]
|
|
public void Return_null_when_list_empty(TagConfigPhase sut)
|
|
{
|
|
var config = new SonarrConfiguration
|
|
{
|
|
ReleaseProfiles = Array.Empty<ReleaseProfileConfig>()
|
|
};
|
|
|
|
var result = sut.Execute(config);
|
|
result.Should().BeNull();
|
|
}
|
|
|
|
[Test, AutoMockData]
|
|
public void Return_tags(TagConfigPhase sut)
|
|
{
|
|
var config = new SonarrConfiguration
|
|
{
|
|
ReleaseProfiles = new[]
|
|
{
|
|
new ReleaseProfileConfig
|
|
{
|
|
Tags = new[] {"one", "two", "three"}
|
|
}
|
|
}
|
|
};
|
|
|
|
var result = sut.Execute(config);
|
|
result.Should().BeEquivalentTo(config.ReleaseProfiles[0].Tags);
|
|
}
|
|
}
|