#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
Added an optional Order parameter for StepArgumentTransformation to prioritize global type handlers effectively, ensuring they're considered last when needed.
Renamed StepTransformationTests file to StepArgumentTransformationTests as this change should've be done with this commit
In .NET 6 and earlier versions, the GetMethods method does not return methods in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which methods are returned, because that order varies. However, starting with .NET 7, the ordering is deterministic based upon the metadata ordering in the assembly.
Type.GetMethods is used to find all StepArgumentTransformation functions, but the order is not deterministic before .NET 7. This inconsistency made it tricky to handle type transformations, especially when setting up global handlers for optional parameters.
Types of changes
[x] New feature (non-breaking change which adds functionality).
[x] Other (docs, build config, etc)
Checklist:
[x] I've added tests for my code. (most of the time mandatory)
[x] I have added an entry to the changelog. (mandatory)
[x] My change requires a change to the documentation.
What's changed
Order
parameter forStepArgumentTransformation
to prioritize global type handlers effectively, ensuring they're considered last when needed.StepTransformationTests
file toStepArgumentTransformationTests
as this change should've be done with this commit(source)
Type.GetMethods
is used to find allStepArgumentTransformation
functions, but the order is not deterministic before .NET 7. This inconsistency made it tricky to handle type transformations, especially when setting up global handlers for optional parameters.Types of changes
Checklist: