As a bonus Xmas gift this week, I completed my part of a code review of a developer’s code before heading out Friday. The code review primarily covered a JSF backing bean/controller and a corresponding test case. Even though the tests had mostly been written after the test case was just a joy to read:
- Clear test names.
- Only 2-4 lines of code for most of the tests.
- Thorough testing of negative conditions like <div class="codecolorer-container text vibrant overflow-off" style="overflow:auto;white-space:nowrap;">
1
testDuplicateRefundsOnlyCountOnce()</div>
.</li>
- 99% unit test coverage according to Clover.</ul>
The only thing I was able to catch was a
1
printLines()method that had been used when writing the tests to output something to the console. The method was still hanging around and didn’t actually do anything because the
1
System.out.println()shad already been removed.