mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-22 21:42:38 +01:00
49 lines
1.6 KiB
C#
49 lines
1.6 KiB
C#
using System.Collections.Generic;
|
|
using Sieve.Services;
|
|
using SieveUnitTests.Services;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace SieveUnitTests
|
|
{
|
|
public abstract class TestBase
|
|
{
|
|
protected TestBase(ITestOutputHelper testOutputHelper)
|
|
{
|
|
TestOutputHelper = testOutputHelper;
|
|
}
|
|
|
|
protected ITestOutputHelper TestOutputHelper { get; }
|
|
|
|
/// <summary>
|
|
/// Processors with the same mappings but configured via a different method.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public static IEnumerable<ISieveProcessor> GetProcessors()
|
|
{
|
|
// normal processor
|
|
yield return new ApplicationSieveProcessor(
|
|
new SieveOptionsAccessor(),
|
|
new SieveCustomSortMethods(),
|
|
new SieveCustomFilterMethods());
|
|
|
|
// nullable processor
|
|
yield return new ApplicationSieveProcessor(
|
|
new SieveOptionsAccessor() { Value = { IgnoreNullsOnNotEqual = false } },
|
|
new SieveCustomSortMethods(),
|
|
new SieveCustomFilterMethods());
|
|
|
|
// modular processor
|
|
yield return new ModularConfigurationSieveProcessor(
|
|
new SieveOptionsAccessor(),
|
|
new SieveCustomSortMethods(),
|
|
new SieveCustomFilterMethods());
|
|
|
|
// modular processor with scan
|
|
yield return new ModularConfigurationWithScanSieveProcessor(
|
|
new SieveOptionsAccessor(),
|
|
new SieveCustomSortMethods(),
|
|
new SieveCustomFilterMethods());
|
|
}
|
|
}
|
|
}
|