≡ Menu

Which convention should we use for naming unit tests?

I am currently reading The Art of Unit Testing by Roy Osherove. He recommends the following naming convention for tests:

Which I am glad is similar to that which I’ve adopted in the past:

I think the latter makes for easier reading. Though I admit that the convention recommended by Roy makes for easier ordering/categorising of tests by scenario.

Whichever method is chosen, I think it’s important that the same standard is adopted by the whole team.

{ 0 comments… add one }

Leave a Comment