blob: 1108a2dbc8b5813fce0407dc2d5c46c169694e10 (
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 ProductParsersTests
{
public void Invoke(string productType, string query, string expected)
{
var modifier = TestServiceCollection.ServiceProvider?.GetRequiredKeyedService<IProductParser>(productType);
string actual = string.Empty;
Assert.That(modifier?.TryParse(query, out actual), Is.True);
Assert.That(actual, Is.EqualTo(expected));
}
}
|