As you might know, I'm a big fan of unit testing and TDD. But I often go back and forth on the naming of my unit tests. There are many popular naming schemes for unit tests. A few of them are:
That's a classical naming scheme.
This is pretty similar to the first scheme. Personally, I like this one a little better than the first one. This one reads a little more naturally. For example:
It reads almost like "WriteToFile throws an exception if file does not exist".
This also reads almost like a "normal" sentence.
This is something I fall back to from time to time. In these cases, my test read something like this:
These are just a few examples. Feel free to add some more naming schemes in the comments.
Whats your favorite naming scheme? Are there naming schemes you do not like?