Why are assertEquals() parameters in the order (expected, actual)?
The answer from Kent Beck, co-creator of JUnit (where possibly this convention originates, since his earlier SUnit doesn’t appear to have included assertEquals): Line a bunch of assertEquals in a row. Having expected first makes them read better. In the initial version of my answer, I said that I didn’t understand this. Here’s what I … Read more