You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should use the new StepTitle attribute from reflective API too #166
+1. The inconsistency between the Reflective and Fluent APIs when it comes to step titles was the main issue I struggled with when I first started BDDfying. I would even take this a step further and say that for total parity, the Fluent API should also recognize the Step Titles that may exist in the GivenAttribute, WhenAttribute, and ThenAttribute (reading through the samples, I just kinda of expected this parity to work).
I see what you mean; but ExecutableAttributes are only used for and from the reflective API, and while one might decide to reuse reflective methods as steps in fluent API I think that's very unlikely and may not necessarily be a good idea as reflective API methods all live next to each other in the scenario class isolated from any other scenario. It's definitely possible to apply this logic - I just think it might lead to confusing usage patterns.
The idea behind this issue was that if you have reflective step methods that follow the naming convention but you just want to override the title for the report you shouldn't have to re-specify the step type using the ExecutableAttributes. Instead you should just be able to use the StepTitle. This will also make it more consistent across the API.
Activity
OmerRaviv commentedon Jul 31, 2014
+1. The inconsistency between the Reflective and Fluent APIs when it comes to step titles was the main issue I struggled with when I first started BDDfying. I would even take this a step further and say that for total parity, the Fluent API should also recognize the Step Titles that may exist in the GivenAttribute, WhenAttribute, and ThenAttribute (reading through the samples, I just kinda of expected this parity to work).
MehdiK commentedon Aug 1, 2014
Thanks for the comment @OmerRaviv.
I see what you mean; but ExecutableAttributes are only used for and from the reflective API, and while one might decide to reuse reflective methods as steps in fluent API I think that's very unlikely and may not necessarily be a good idea as reflective API methods all live next to each other in the scenario class isolated from any other scenario. It's definitely possible to apply this logic - I just think it might lead to confusing usage patterns.
The idea behind this issue was that if you have reflective step methods that follow the naming convention but you just want to override the title for the report you shouldn't have to re-specify the step type using the ExecutableAttributes. Instead you should just be able to use the
StepTitle. This will also make it more consistent across the API.OmerRaviv commentedon Aug 1, 2014
Thanks for the clarification, Mehdi. I see your point, that makes perfect sense to me.