Skip to content

Support formatted strings (which are used if one uses @ParameterizedTest) #15

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

Closed
wants to merge 1 commit into from

Conversation

jevanlingen
Copy link

What's changed?

The formatted string call is processed as well, so we can use the @ParameterizedTest annotation instead of @test

@jevanlingen jevanlingen added the enhancement New feature or request label May 27, 2025
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite May 27, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • src/main/java/org/openrewrite/java/recipes/ExamplesExtractor.java
    • lines 400-401

@timtebeek
Copy link
Member

Closing this effort for now, as I don't think we can (or should) support this case in the docs: The docs are most readable when there's at most one document example, with a clear before and after text block. With formatted we wouldn't know what arguments to pass in, unless we also start to parse all variants of MethodSource/CsvSource/ValueSource/..., which is likely to add complications beyond what we want to cover here.

@timtebeek timtebeek closed this Jun 13, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants