15 lines
472 B
C#
15 lines
472 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace RhSolutions.Api.Tests;
|
|
|
|
public abstract class ProductQueryModifierTests
|
|
{
|
|
public void Invoke(string productType, string query, string expected)
|
|
{
|
|
var modifier = TestServiceCollection.ServiceProvider?.GetRequiredKeyedService<IProductMLModifier>(productType);
|
|
string actual = string.Empty;
|
|
Assert.That(modifier?.TryQueryModify(query, out actual), Is.True);
|
|
Assert.That(actual, Is.EqualTo(expected));
|
|
}
|
|
}
|