Inspectopedia
 
2024.3

JUnit 5 obsolete assertions

Warning
Code Style
New
Last modified: 03 December 2024

Reports any calls to methods from the junit.framework.Assert, org.junit.Assert, or org.junit.Assume classes inside JUnit 5 tests.

Although the tests work properly, migration to org.junit.jupiter.api.Assertions/org.junit.jupiter.api.Assumptions will help you avoid dependencies on old JUnit version.

Example:

After the quick-fix is applied: