-
Notifications
You must be signed in to change notification settings - Fork 79
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
AssertionsForClassTypes import is replaced by Assertions #665
AssertionsForClassTypes import is replaced by Assertions #665
Conversation
Thanks @barbulescu ! I'd missed your PR as I don't get notified about drafts; would you want to continue to work on this? Would you need any guidance as you do so? |
Yes, I would like to continue but I need some guidance. |
@scordio I hope you don't mind me tagging you here; don't feel pressured to respond if you're busy! For context, we have some recipes that nudge folks to use the rewrite-testing-frameworks/src/main/resources/META-INF/rewrite/assertj.yml Lines 61 to 69 in fc9d8b4
Up to now that had mostly worked quite well for us; it's just in this case that we've encountered a difference in the returned types ( AbstractObjectAssert vs AbstractCollectionAssert ) between AssertionsForClassTypes and Assertions when passing in a collection, and what assertion methods we can call on those return types (hasNoNullFieldsOrProperties not on AbstractCollectionAssert , as that extends AbstractAssert , not AbstractObjectAssert ).
Is my expectation just off that folks should be able to use |
At first glance, it looks like an oversight on our end. I'll have a deeper look and get back to you! |
Some thoughts added at #664 (comment).
Your expectation makes sense, although there can be corner cases that require a more specific strategy (more in my other comment).
Yes – in this context, |
Thanks for chiming in @scordio ! With more details added to the associated issue let's track the suggested next steps there. If it turns out we do want to make code changes to accommodate we can already reopen this pull request. |
What's changed?
Add test to reproduce the issue.
What's your motivation?
Code does not compile after execution.
Anything in particular you'd like reviewers to focus on?
Anyone you would like to review specifically?
Have you considered any alternatives or workarounds?
Any additional context
Checklist