diff options
author | Serghei Cebotari <serghei@cebotari.ru> | 2024-02-08 17:11:11 +0300 |
---|---|---|
committer | Serghei Cebotari <serghei@cebotari.ru> | 2024-02-08 17:11:11 +0300 |
commit | 69db707d6803ada3891e4e71b8660ad095392973 (patch) | |
tree | d188676a0a5c40816fc6fa73955e883ea1f8c206 /RhSolutions.Parsers.Tests/ProductParsersTests.cs | |
parent | a9ce0c1785ce7c220ff953db7a21cf33535c6d26 (diff) |
Rename Parser projects
Diffstat (limited to 'RhSolutions.Parsers.Tests/ProductParsersTests.cs')
-rw-r--r-- | RhSolutions.Parsers.Tests/ProductParsersTests.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/RhSolutions.Parsers.Tests/ProductParsersTests.cs b/RhSolutions.Parsers.Tests/ProductParsersTests.cs new file mode 100644 index 0000000..1108a2d --- /dev/null +++ b/RhSolutions.Parsers.Tests/ProductParsersTests.cs @@ -0,0 +1,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)); + } +} |