New JUnitAssertEqualsConstantActualValue rule
Brought to you by:
chrismair
For calls to assertEquals(x, y), if y is a constant or literal, then it probably (must?) is intended to the expected value, rather than the actual value.
e.g.
assertEquals(links.length,1);
assertEquals(links[0].getText(),"IBM");
Same for assertEquals(String message, x, y).
Fix in https://github.com/CodeNarc/CodeNarc/pull/16 :)
Best regards,
Artur Gajowy