Files
openide/java/java-impl/resources/inspectionDescriptions/MisorderedAssertEqualsArguments.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

22 lines
683 B
HTML

<html>
<body>
Reports calls to <code>assertEquals()</code> that have the expected argument and the actual argument in the wrong order.
<p>
For JUnit 3, 4, and 5 the correct order is <code>(expected, actual)</code>.
For TestNG the correct order is <code>(actual, expected)</code>.
</p>
<p>
Such calls will behave fine for assertions that pass, but may give confusing error reports on failure.
Use the quick-fix to flip the order of the arguments.
</p>
<p><b>Example (JUnit):</b></p>
<pre><code>
assertEquals(actual, expected)
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
assertEquals(expected, actual)
</code></pre>
<!-- tooltip end -->
</body>
</html>