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

RemoveTestPrefix should also remove prefixes of implicitly referenced @MethodSource methods #462

Open
koppor opened this issue Jan 16, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@koppor
Copy link
Contributor

koppor commented Jan 16, 2024

When @MethodSource is hit, the referenced method should also be renamed

     @ParameterizedTest
     @MethodSource
-    void testContainsWhitespace(Boolean expected, String input) {
+    void containsWhitespace(Boolean expected, String input) {
        assertEquals(expected, StringUtil.containsWhitespace(input));
    }

That should also do

-    static Stream<Arguments> testContainsWhitespace() {
+    static Stream<Arguments> containsWhitespace() {

(but does not)

Relates to #258

@koppor koppor added the bug Something isn't working label Jan 16, 2024
@koppor koppor changed the title RemoveTestPrefix RemoveTestPrefix should also remove prefixes of implicitly referenced @MethodSource methods Jan 16, 2024
@timtebeek timtebeek added enhancement New feature or request and removed bug Something isn't working labels Jan 16, 2024
@timtebeek
Copy link
Contributor

timtebeek commented Jan 16, 2024

Pushed up a small change to at least do no harm for now a426e40
We can keep this issue open for an improvement that also renames the implied method source, or introduces an explicitly named method source annotation argument.

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: Backlog
Development

No branches or pull requests

2 participants