Skip to content

Deprecate AssertionsForClassTypes and AssertionsForInterfaceTypes#4268

Draft
scordio wants to merge 1 commit into
3.xfrom
gh-4266-deprecate-entry-points
Draft

Deprecate AssertionsForClassTypes and AssertionsForInterfaceTypes#4268
scordio wants to merge 1 commit into
3.xfrom
gh-4266-deprecate-entry-points

Conversation

@scordio

@scordio scordio commented May 30, 2026

Copy link
Copy Markdown
Member

@scordio scordio force-pushed the gh-4266-deprecate-entry-points branch from b7aca6e to b1d3bb2 Compare May 30, 2026 09:46
Signed-off-by: Stefano Cordio <stefano.cordio@gmail.com>
@scordio scordio force-pushed the gh-4266-deprecate-entry-points branch from b1d3bb2 to 1630b18 Compare May 30, 2026 10:05
@scordio scordio added this to the 3.28.0 milestone May 30, 2026
@testlens-app

testlens-app Bot commented May 30, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 1630b18
▶️ Tests: 108552 executed
⚪️ Checks: 17/17 completed


Learn more about TestLens at testlens.app.

timtebeek added a commit to openrewrite/rewrite-testing-frameworks that referenced this pull request Jun 1, 2026
…tions (#1010)

AssertJ deprecated `AssertionsForClassTypes` and `AssertionsForInterfaceTypes`
in favor of the unified `Assertions` entry point (assertj/assertj#4268).

This adds `MigrateAssertionsForClassAndInterfaceTypes`, which retargets all
static methods of both classes to `Assertions`. The generic
`AssertionsForClassTypes.assertThat(T)` returns an `ObjectAssert`, but the
unified `Assertions` also offers more specific overloads, so a naive swap would
re-bind an `Iterable`/`Map`/`Comparable`/... argument to e.g. `IterableAssert`
and stop compiling. The new type-aware `MigrateAssertionsForClassTypes` recipe
routes only those colliding arguments to `assertThatObject`, resolving #664.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant