0
0
RhSolutions-Api/RhSolutions.Api.Tests/ProductQueryModifierTests.cs

18 lines
468 B
C#
Raw Normal View History

2023-12-30 14:43:25 +03:00
namespace RhSolutions.Api.Tests;
2023-10-03 21:57:33 +03:00
public abstract class ProductQueryModifierTests
2023-09-29 10:07:41 +03:00
{
2023-10-03 21:57:33 +03:00
protected ProductQueryModifierFactory _factory;
2023-09-29 10:07:41 +03:00
2023-10-01 22:14:47 +03:00
[SetUp]
public void Setup()
{
_factory = new ProductQueryModifierFactory();
}
2023-10-20 22:35:44 +03:00
public void Execute(string productType, string query, string expected)
2023-10-01 22:14:47 +03:00
{
2023-10-20 22:35:44 +03:00
var modifier = _factory.GetModifier(productType);
2023-12-30 14:43:25 +03:00
Assert.That(modifier.TryQueryModify(query, out var actual), Is.True);
2023-10-20 22:35:44 +03:00
Assert.That(actual, Is.EqualTo(expected));
2023-10-01 22:14:47 +03:00
}
2023-09-29 10:07:41 +03:00
}