Reqnroll
Reqnroll copied to clipboard
Regex evaluation with StepArgumentTransformation creates undesired behaviour.
Reqnroll Version
2.4.1
Which test runner are you using?
MSTest
Test Runner Version Number
3.9.3
.NET Implementation
.NET 9.0
Test Execution Method
Visual Studio Test Explorer
Content of reqnroll.json configuration file
no json is used
Issue Description
this works
[Given(@"the Test Object")]
[Given(@"the Test Objects")]
public void GivenThetestObjects(Dictionary<string, TestObject> testObjects)
this is not detected
[Given(@"the Test Objects?")]
public void GivenThetestObjects(Dictionary<string, TestObject> testObjects)
and this work again
[Given(@"the Test Objects?$")]
public void GivenThetestObjects(Dictionary<string, TestObject> testObjects)
this is the transformation; changing to DataTable does not help.
[StepArgumentTransformation]
public Dictionary<string, T> TransformDictionary(Table table)
Steps to Reproduce
https://github.com/Possum-Labs/DSL/commit/fe496cd07b539080ef6b4df4c6c91fabf77946e8
Link to Repro Project
https://github.com/Possum-Labs/DSL/
This issue could be resolved with the idea in #663
With Reqnroll 3 you could fix this with the ExpressionType parameter, see https://docs.reqnroll.net/latest/automation/cucumber-expressions.html#explicit-expression-type-control
So closing this as fixed :)