Adding a Scope attribute to a SpecFlow class containing StepArgumentTransformations is not working
I am trying to add the following attribute to a class containing StepArgumentTransformations:
[Scope(Feature = "Project List")]
I had thought this could be done, where my feature title is "Project List" but the correct StepArgumentTransformation method is not being ran and instead my Project List scenarios are running a different step argument transformation inside another class with a different Scope attribute. From what I can tell, it is ignoring the Scope attribute altogether.
For context, the reason I am doing this is because each feature's scenarios cares about different properties of a model that I am trying to convert from an in-line table within the scenario step and I am having to do extra logic per feature in order to set-up default values or do extra transformation of the data coming from the in-line table, so it is hard for me to re-use the one Step Argument Transformation method even though the method signature is identical, the contents of the Table are not.
So, is it possible to use the Scope attribute with a SpecFlow class containing Step Argument Transformations? and if so, is this a bug or what could I be doing wrong?
Please sign in to leave a comment.