16 lines
425 B
C#
16 lines
425 B
C#
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.True(modifier.TryQueryModify(query, out var actual));
|
|
Assert.That(actual, Is.EqualTo(expected));
|
|
}
|
|
} |