summaryrefslogtreecommitdiff
path: root/RhSolutions.Parsers.Tests/ProductParsersTests.cs
diff options
context:
space:
mode:
authorSerghei Cebotari <serghei@cebotari.ru>2024-02-08 17:11:11 +0300
committerSerghei Cebotari <serghei@cebotari.ru>2024-02-08 17:11:11 +0300
commit69db707d6803ada3891e4e71b8660ad095392973 (patch)
treed188676a0a5c40816fc6fa73955e883ea1f8c206 /RhSolutions.Parsers.Tests/ProductParsersTests.cs
parenta9ce0c1785ce7c220ff953db7a21cf33535c6d26 (diff)
Rename Parser projects
Diffstat (limited to 'RhSolutions.Parsers.Tests/ProductParsersTests.cs')
-rw-r--r--RhSolutions.Parsers.Tests/ProductParsersTests.cs14
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));
+ }
+}