SpecFlowOSS / SpecFlow

#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
https://www.specflow.org/
Other
2.23k stars 752 forks source link

Update rules for step definitions methods #2576

Closed SamJ26 closed 2 years ago

SamJ26 commented 2 years ago

The Step Definition Methods Rules section states that "method can not have a return type or have a Task as return type". I tried to change my method to return int instead of void and it works without errors. So I guess if it's not a rule which would cause an error than it should be rather recommendation than rule.

If it's a bug that SpecFlow should catch, I can provide you steps to reproduce it (although it's a very simple 😀)

Types of changes

Checklist:

SabotageAndi commented 2 years ago

Yeah, we don't enforce this rule. If it is not a Task, we simply ignore the return type.

Thanks for your contribution to SpecFlow. Please submit your contributions to our SpecFlow Community Heroes program at https://specflow.org/community/submit-a-contribution/