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

Extend TestNGToAssertJRules Refaster rule collection #1483

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

Stephan202
Copy link
Member

@Stephan202 Stephan202 commented Dec 27, 2024

Suggested commit message:

Extend `TestNGToAssertJRules` Refaster rule collection (#1483)

By migrating all remaining `assertEquals` methods.

While working on this I found an issue; filed testng-team/testng#3199.

(Perhaps it's time to move this to an Error Prone check, but given that we don't use TestNG internally anymore, that's likely not worth the trouble. I opened this PR primarily because I had a branch with some of these changes, and decided it was time to "flush" that work.)

Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@Stephan202 Stephan202 force-pushed the sschroevers/more-testng-to-assertj-rules branch from f501c9b to 94bff3e Compare December 28, 2024 17:02
@Stephan202 Stephan202 marked this pull request as ready for review December 28, 2024 17:04
Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

Copy link

Copy link
Contributor

@mohamedsamehsalah mohamedsamehsalah left a comment

Choose a reason for hiding this comment

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

🚜

Copy link
Member

@rickie rickie left a comment

Choose a reason for hiding this comment

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

Ohh this is very nice for the (hopefully soon) coming JDK TestNG migration 😄.

One small point :).

@@ -635,6 +818,58 @@ void after(Object[] actual, String message, Object[] expected) {
}
}

static final class AssertEqualFloatArraysWithDelta {
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking that maybe we should update the Refaster rule names for the ones that we introduce or tweaked. I can see how we maybe don't want to touch all of those names here right now as well; so I'm also fine with leaving it as is for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'm often torn on this point. Reason I prefer to stick with the naming scheme in this class for now is that (a) it makes it easier to see which rules are still missing (and where to insert them) and (b) we haven't finalized the naming scheme yet, while I expect many edge cases to surface (see e.g. this comment, but I have similar struggles with another set of "migration-style" Refaster rules I'm currently working on).

@Stephan202 Stephan202 merged commit 6477c18 into master Jan 1, 2025
16 checks passed
@Stephan202 Stephan202 deleted the sschroevers/more-testng-to-assertj-rules branch January 1, 2025 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants