Inspectopedia
 
2024.3

'assertEquals()' between objects of inconvertible types

Warning
Reliability
New
Last modified: 03 December 2024

Reports calls to assertion methods where the "expected" and "actual" arguments are of incompatible types.

Such calls often indicate that there is a bug in the test. This inspection checks the relevant JUnit, TestNG, and AssertJ methods.

Examples: