Skip to content

Replace AssertionsForClassTypes references with Assertions #636

Open
@ash211

Description

@ash211

What happened?

AssertionsForClassTypes exists as a near-duplicate of the assertj Assertions class. My understanding is that this is due to a deficiency in the Java type system in earlier Java releases, which has now been fixed. Any Java code compiled at Java 11 target or higher should be able to use just the Assertions methods, and can/should ignore AssertionsForClassTypes and also AssertionsForInterfaceTypes.

What did you want to happen?

A migration that can do:

import static org.assertj.core.api.AssertionsForClassTypes.assertThatCode;

->

import static org.assertj.core.api.Assertions.assertThatCode;

and similar for other static imports.

Plus also replace direct references like AssertionsForClassTypes.assertThat(x)... with the statically-imported method from Assertions so we can call assertThat(x)...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions