Check out this blog post I wrote about how to name a unit test.

Main points:

  • Don’t use a rigid test naming policy.

  • Name the tests as if you were describing the scenario in it to a non-programmer familiar with the problem domain.

  • Separate words in the test name by underscores.

  • Don’t include the name of the method under test in the test name.

--Vlad

https://enterprisecraftsmanship.com


Enjoy this message? Here are more things you might like:

Workshops — I offer a 2-day workshop for organizations on Domain-Driven Design and Unit Testing. Reply to this email to discuss.

Unit Testing Principles, Patterns and Practices — A book for people who already have some experience with unit testing and want to bring their skills to the next level.
Learn more »

My Pluralsight courses — The topics include Unit Testing, Domain-Driven Design, and more.
Learn more »