score:2

Accepted answer

you need to unit-test the second method just to make sure it works. if you refactor something that changes how it works and fix the first one, how will you know if you forgot to fix the second one? if you refactor withordering, how will you know that things still work? i would have a unit test to test ascending and one to test descending.


Related Query

More Query from same tag