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

feat: move CalculateArguments to MatchArgumentCalculator #243

Merged

Conversation

olegKoshmeliuk
Copy link
Member

@olegKoshmeliuk olegKoshmeliuk commented Aug 28, 2024

🤔 What's changed?

As suggested in #238 (review)
Moved CalculateArguments to MatchArgumentCalculator.

⚡️ What's your motivation?

Allow override of how Reqnroll calculates parameters with old/legacy behavior.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behavior)

♻️ Anything particular you want feedback on?

I don't see useful writing tests for this new class or testing StepDefinitionMatchService with mock MatchArgumentCalculator.

An alternative approach can be done by just changing CalculateArguments to protected virtual that will not require updating tests

📋 Checklist:

  • I've changed the behavior of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "[vNext]" section of the CHANGELOG, linking to this pull request & included my GitHub handle to the release contributors list.

This text was originally taken from the template of the Cucumber project, then edited by hand. You can modify the template here.

Copy link
Contributor

@gasparnagy gasparnagy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. See my comments about the global container below.
Besides that, please add a line for it to the changelog (like "added option to override regex group matching behavior") and list yourself to the contributors of this release.

Reqnroll/Infrastructure/DefaultDependencyProvider.cs Outdated Show resolved Hide resolved
@olegKoshmeliuk olegKoshmeliuk force-pushed the feat/added-MatchArgumentCalculator branch 2 times, most recently from d4b35d2 to b7add44 Compare August 29, 2024 17:25
@olegKoshmeliuk olegKoshmeliuk force-pushed the feat/added-MatchArgumentCalculator branch from b7add44 to aa61b70 Compare August 29, 2024 17:30
Copy link
Contributor

@gasparnagy gasparnagy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx!

@gasparnagy gasparnagy merged commit 812ffc8 into reqnroll:main Aug 30, 2024
4 checks passed
@gasparnagy
Copy link
Contributor

@olegKoshmeliuk Thank you for the contribution! According to our guidelines I have invited you to the Reqnroll contributors team. Congrats! 🎉 If you accept it, you will be able to make pull requests easier in the future.

You are also welcome on our discord server: https://go.reqnroll.net/discord-invite

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