summaryrefslogtreecommitdiff
path: root/RhSolutions.Api.Tests/ProductQueryModifierTests.cs
blob: a642f9c80b09a94f8258b1eef9cb8898032e3aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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));
	}
}