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

Document best practices for implementing ParameterResolvers #1190

Closed
2 tasks
sbrannen opened this issue Nov 28, 2017 · 10 comments · Fixed by #3829
Closed
2 tasks

Document best practices for implementing ParameterResolvers #1190

sbrannen opened this issue Nov 28, 2017 · 10 comments · Fixed by #3829

Comments

@sbrannen
Copy link
Member

sbrannen commented Nov 28, 2017

Overview

Based on discussions in #1184 and weld/weld-testing#3, it is apparent that we need to document best practices for implementing ParameterResolver, particularly with regard to "playing nicely" with other registered ParameterResolver implementations.

Proposed Categories

After having put a bit more thought into the subject, I am tossing around the idea of categorizing ParameterResolver implementations by behavior as follows.

  • explicit: support requires an annotation for disambiguation.
  • implicit: support is automatic for types owned by the resolver.
  • speculative: a resolver claims it can support a given parameter even if it potentially should not (a.k.a., greedy or eager).

Deliverables

  • Document best practices for ParameterResolver implementations in JavaDoc.
    • more succinct than the documentation in the User Guide
  • Document best practices for ParameterResolver implementations in the User Guide.
    • including examples and explanations of how to avoid conflicts
@sbrannen sbrannen added this to the 5.1 M2 milestone Nov 28, 2017
@sbrannen sbrannen changed the title Document best practices for ParameterResolvers Document best practices for implementing ParameterResolvers Nov 28, 2017
@sbrannen
Copy link
Member Author

Update: added Proposed Categories section to issue.

@rumpfc
Copy link

rumpfc commented Dec 15, 2017

Can you also provide examples for error/exception handling within ParameterResolver which are actually not ParameterResolutionExceptions (i.e. resolveParameter() reads a File where an IOException is thrown)?

@stale
Copy link

stale bot commented May 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. Thank you for your contribution.

@stale stale bot added the status: stale label May 13, 2021
@stale
Copy link

stale bot commented Jun 3, 2021

This issue has been automatically closed due to inactivity. If you have a good use case for this feature, please feel free to reopen the issue.

@stale stale bot closed this as completed Jun 3, 2021
@marcphilipp marcphilipp removed this from the 5.8 Backlog milestone Jun 19, 2021
@slinkydeveloper
Copy link

Hey @marcphilipp @sbrannen, can you please re-open this issue? I think it's still relevant, as right now it's not clear how to develop a ParameterResolver that doesn't conflict with other parameter resolvers, and in particular to create one that doesn't conflict with ParameterizedTest. I'm also willing to help with the review of the doc.

My use case is that I want to create a test matrix combining several TestTemplateInvocationContextProvider, in particular my own ParameterResolver (injected through an implementation of TestTemplateInvocationContextProvider) and @ParameterizedTest.

@sbrannen
Copy link
Member Author

can you please re-open this issue? I think it's still relevant, as right now it's not clear how to develop a ParameterResolver that doesn't conflict with other parameter resolvers,

Sure. I'll reopen this issue.

and in particular to create one that doesn't conflict with ParameterizedTest.

That aspect is already covered in the current documentation.

@sbrannen sbrannen reopened this Mar 29, 2022
@stale stale bot removed the status: stale label Mar 29, 2022
@stale
Copy link

stale bot commented Mar 29, 2023

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. Thank you for your contribution.

@stale stale bot added the status: stale label Mar 29, 2023
@stale
Copy link

stale bot commented Apr 20, 2023

Closing due to lack of requested feedback. If you would like to proceed with your contribution, please provide the requested information and we will re-open this issue.

@stale stale bot closed this as completed Apr 20, 2023
@marcphilipp marcphilipp reopened this Apr 22, 2023
@stale stale bot removed the status: stale label Apr 22, 2023
jabhatfield pushed a commit to jabhatfield/junit5 that referenced this issue May 22, 2024
jabhatfield pushed a commit to jabhatfield/junit5 that referenced this issue May 23, 2024
@jabhatfield
Copy link
Contributor

PR for this issue had some formatting violations, now fixed.

@jabhatfield
Copy link
Contributor

Hi @sbrannen, I've created a PR for this issue.

@marcphilipp marcphilipp linked a pull request Jun 20, 2024 that will close this issue
6 tasks
@marcphilipp marcphilipp added this to the 5.11 M3 milestone Jun 20, 2024
jabhatfield pushed a commit to jabhatfield/junit5 that referenced this issue Jul 3, 2024
jabhatfield pushed a commit to jabhatfield/junit5 that referenced this issue Jul 3, 2024
marcphilipp added a commit that referenced this issue Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants