18 lines
468 B
C#
18 lines
468 B
C#
namespace RhSolutions.Api.Tests;
|
|
|
|
public abstract class ProductQueryModifierTests
|
|
{
|
|
protected ProductQueryModifierFactory _factory;
|
|
|
|
[SetUp]
|
|
public void Setup()
|
|
{
|
|
_factory = new ProductQueryModifierFactory();
|
|
}
|
|
public void Execute(string productType, string query, string expected)
|
|
{
|
|
var modifier = _factory.GetModifier(productType);
|
|
Assert.That(modifier.TryQueryModify(query, out var actual), Is.True);
|
|
Assert.That(actual, Is.EqualTo(expected));
|
|
}
|
|
} |