Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed NUnit3TestGeneratorProvider.SetTestMethod() and NUnit3TestGeneratorProvider.SetRowTest() to virtual #2567

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

farum12
Copy link
Contributor

@farum12 farum12 commented Mar 10, 2022

Changed NUnit3TestGeneratorProvider.SetTestMethod() and NUnit3TestGeneratorProvider.SetRowTest() to virtual. This will enable them to be overriden in generator plugins.

Why?
XUnit2TestGeneratorProvider has these methods virtual. This enables overriding but keeping the ability to invoke base methods' code.
This enables generator plugin devs to add additional functionality such as adding custom attributes during tag discovery in various situations (scenarios/scenario outlines/features/with tag/without tag).

NUnit3TestGeneratorProvider hasn't these methods virtual. Therefore, anyone who would want to override functionality, had to copy the entire NUnit3TestGeneratorProvider's body, and then add desired additional functionality. This could cause 3rd party generator plugins to be prone to updates in NUnit3TestGeneratorProvider class.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Performance improvement
  • Refactoring (so no functional change)
  • Other (docs, build config, etc)

Checklist:

  • I've added tests for my code. (most of the time mandatory)
  • I have added an entry to the changelog. (mandatory)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@SabotageAndi SabotageAndi merged commit f6c5765 into SpecFlowOSS:master Mar 10, 2022
Code-Grump pushed a commit to Code-Grump/SpecFlow that referenced this pull request Mar 29, 2023
…eratorProvider.SetRowTest() to virtual (SpecFlowOSS#2567)

Co-authored-by: Piotr Niedzialek <pniedzialek@altimetrik.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants