Inspectopedia Help

Message missing on assertion

Reports calls to assertXXX() or fail() without an error message string argument. An error message on assertion failure may help clarify the test case's intent.

Example:

assertTrue(checkValid());

After the quick-fix is applied:

assertTrue(checkValid(), "|");

The message argument is added before or after the existing arguments according to the assertions framework that you use.

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023