The quality size factory now implements an interface so that tests can mock it.pull/312/head
parent
042840b8bc
commit
e33b75d3f1
@ -0,0 +1,9 @@
|
|||||||
|
using Recyclarr.TrashGuide;
|
||||||
|
using Recyclarr.TrashGuide.QualitySize;
|
||||||
|
|
||||||
|
namespace Recyclarr.Cli.Pipelines.QualitySize.PipelinePhases.Limits;
|
||||||
|
|
||||||
|
public interface IQualityItemLimitFactory
|
||||||
|
{
|
||||||
|
Task<QualityItemLimits> Create(SupportedServices serviceType, CancellationToken ct);
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using Recyclarr.Cli.Pipelines.QualitySize.PipelinePhases.Limits;
|
||||||
|
using Recyclarr.Tests.TestLibrary;
|
||||||
|
using Recyclarr.TrashGuide;
|
||||||
|
using Recyclarr.TrashGuide.QualitySize;
|
||||||
|
|
||||||
|
namespace Recyclarr.Cli.TestLibrary;
|
||||||
|
|
||||||
|
public class TestQualityItemLimitFactory : IQualityItemLimitFactory
|
||||||
|
{
|
||||||
|
public Task<QualityItemLimits> Create(SupportedServices serviceType, CancellationToken ct)
|
||||||
|
{
|
||||||
|
return Task.FromResult(new QualityItemLimits(
|
||||||
|
TestQualityItemLimits.MaxUnlimitedThreshold,
|
||||||
|
TestQualityItemLimits.PreferredUnlimitedThreshold));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue